def is_in(elements, value):
    """
    Determines if a value is in a list. It also handles degenerate cases
    when instead of a list, elements is True, False  or None
    """
    if not elements:
        return False
    elif elements is True:
        return True
    else:
        return value in elements