def not_empty(message=None) -> Filter_T:
    """
    Validate any object to ensure it's not empty (is None or has no elements).
    """

    def validate(value):
        if value is None:
            _raise_failure(message)
        if hasattr(value, '__len__') and value.__len__() == 0:
            _raise_failure(message)
        return value

    return validate