def has_value(var):
    if var is None:
        return

    return bool(var) or (var in (False, 0))
Returns ``True`` if `var` is not ``None`` and not empty.
dataset/ETHPy150Open STIXProject/python-stix/stix/utils/__init__.py/has_value