def check_name(name, name_list):
    """
    Check the validity of name.

    :param name: test name
    :type name: str
    :param name_list: players names
    :type name_list: list
    :return: validity as bool
    """
    if len(name) != 0 and name not in name_list:
        return True
    return False