def is_same_len_or_none(*args):
    """
    >>> is_same_len_or_none(1, 'aaa')
    Traceback (most recent call last):
        ...
    TypeError: object of type 'int' has no len()

    >>> is_same_len_or_none([1], ['aaa'])
    True
    >>> is_same_len_or_none([1, 'b'], ['aaa', 222])
    True
    >>> is_same_len_or_none([1, 'b', 3], ['aaa', 222, 'ccc'])
    True

    >>> is_same_len_or_none([], ['aaa'])
    False
    >>> is_same_len_or_none([1], ['aaa', 222])
    False
    >>> is_same_len_or_none([1, 'b'], ['aaa'])
    False

    >>> is_same_len_or_none([1], ['aaa'], [111])
    True
    >>> is_same_len_or_none([1, 'b'], ['aaa', 222], [111, 'BBB'])
    True
    >>> is_same_len_or_none([1, 'b', 3], ['aaa', 222, 'ccc'], [111, 'BBB', 333])
    True

    >>> is_same_len_or_none([], ['aaa'], [111])
    False
    >>> is_same_len_or_none([1], ['aaa', 222], [111, 'BBB'])
    False
    >>> is_same_len_or_none([1, 'b'], ['aaa'], [111, 'BBB'])
    False

    >>> is_same_len_or_none([1, 'b'], None)
    True
    >>> is_same_len_or_none(None, ['aaa'])
    True
    >>> is_same_len_or_none(None, None)
    True

    >>> is_same_len_or_none([1, 'b'], None, ['aaa', 222])
    True
    >>> is_same_len_or_none(None, ['aaa'], [111])
    True
    >>> is_same_len_or_none(None, None, [111, 'BBB'])
    True
    >>> is_same_len_or_none(None, None, None)
    True

    >>> is_same_len_or_none([1], None, ['aaa', 222])
    False
    >>> is_same_len_or_none(None, ['aaa'], [])
    False
    >>> is_same_len_or_none(None, ['aaa'], [111, 'BBB'])
    False
    """
    the_len = None
    for x in args:
        if x is not None:
            if the_len is None:
                the_len = len(x)
            elif the_len != len(x):
                return False
    return True
