def exists_piece(conn, piecetype, piecename):

    """checks for existence of piece name/type."""

    return bool(
        conn.execute(
            """SELECT * FROM pieces
                                WHERE piecetype=?
                                AND piecename=?;""",
            (piecetype, piecename),
        ).fetchall()
    )