def _agent_has_email_address(agent_obj):
    """Check if agent has email.

    Arguments:
        agent_obj (list/dict): The specified field from the research dataset. If publisher then dict else list

    Returns:
        bool: True if has emails, False if not.

    """
    if agent_obj:
        if isinstance(agent_obj, list) and len(agent_obj) > 0:
            return 'email' in agent_obj[0]
        elif isinstance(agent_obj, dict):
            return 'email' in agent_obj
    return False