def first_item(list_or_dict):
    """
    If passed a list, this returns the first item of the list.
    If passed a dict, this returns the value of the first key of the dict.

    :param < list | dict > list_or_dict: A list or a dict.
    :rtype obj: The first item of the list, or the first value of the dict
    """
    if isinstance(list_or_dict, list):
        return next(iter(list_or_dict), None)
    elif isinstance(list_or_dict, dict):
        return next(iter(list_or_dict.values()), None)
    else:
        raise Exception("Must pass a list or a dict to first_item")