import typing


def empty(x: typing.Any) -> bool:
    """Returns true if x is None, or if x doesn't have a length, or if x's length is 0
    """
    if x is None:
        return True
    # noinspection PyBroadException
    try:
        return len(x) == 0
    except:  # noinspection PyBroadException
        return False