1 What’s the database in use here?
2 Is the criteria being sent to the server simple or advanced? Simple criteria are just plain key/value pair objects, whereas Advanced criteria are structured objects that declare _constructor: “AdvancedCriteria”
Testing here, we see the issue you refer to, but the query returns the expected results anyway. The reason we test numeric columns against strings is that it allows us to offer substring filtering (so, filter where a given numeric field contains a 3, or ends in 75, or whatever). Obviously, we would not need to do this for a straight equality test, but it doesn’t appear to make a difference whether the SQL comparison value is quoted or unquoted.