def get_category_id(conn, category_name, category_type_id):
    if (is_conn(conn) and is_str(category_name) and is_int(category_type_id)):
        cursor = conn.cursor()
        cursor.execute('SELECT Id FROM dbo.Categories WHERE             CategoryName=? AND CategoryType=?', (category_name, category_type_id))
        return cursor.fetchall()[0][0]
    else:
        raise AttributeError('Connection object or Category Name or Category Type ID                 was not provided')
def get_category_id(conn, category_name, category_type_id):
    if (is_conn(conn) and is_str(category_name) and is_int(category_type_id)):
        cursor = conn.cursor()
        cursor.execute('SELECT Id FROM dbo.Categories WHERE             CategoryName=? AND CategoryType=?', (category_name, category_type_id))
        return cursor.fetchall()[0][0]
    else:
        raise AttributeError('Connection object or Category Name or Category Type ID                 was not provided')