def omit_empty_items(sequence):
    """
    Filters out sequence items which are :const:`None` or empty. If argument is
    :const:`None` than the return value is :const:`None` too, but if argument
    is an empty sequence, another empty sequence is returned.

        >>> list(omit_empty_items([]))
        []
        >>> list(omit_empty_items(["", "1", "", "23"]))
        ['1', '23']


    """
    return None if sequence is None \
        else filter(lambda x: (x is not None) and (len(x) != 0), sequence)