def add_valid_identifier(cursor, metabolite_id, identifier, resource_id):
    """ Add identifier to table if the identifier matches the validator

    Parameters
    ----------
    metabolite_id : int
    cursor : sqlite3.connection.cursor
    validator : str
    resource : str
    identifier

    Returns
    -------
    """
    try:
        cursor.execute('INSERT INTO metabolite_ids VALUES (NULL, ?, ?, ?)',
            (metabolite_id, resource_id, identifier))
    except:
        print(metabolite_id, resource_id, identifier)
        raise TypeError
