def has_data(data):
    """
    check if data exists. compares dict to empty dict else to None

    Args:
        data (obj): dat ato validate
    Returns:
        bool: whether data is present
    """
    if isinstance(data, dict):
        state = data != {}
    else:
        state = data is not None

    return state