Returns True if the value is not None, and if it is either not a string, or a string with
    length > 0.

def _is_present(val):
    """Returns True if the value is not None, and if it is either not a string, or a string with
    length > 0.
    """
    if val is None:
      return False
    if isinstance(val, str):
      return len(val) > 0
    return True