import sqlite3


def robot_type_exists(cursor: sqlite3.Cursor, type: str) -> bool:
    """Determines whether or not the robot type exists in the db

    :param cursor: [description]
    :type cursor: sqlite3.Cursor
    :param type: [description]
    :type type: str
    :return: [description]
    :rtype: bool
    """

    type_exists: int = cursor.execute(
        '''SELECT COUNT(*)
        FROM robot_type
        WHERE id = :id''',
        {"id": type.upper()}
    ).fetchone().get("COUNT(*)")

    return True if type_exists == 1 else False