Jwang refactor query encoding

I don't think this is necessary for `String` types like `language` -- only the primitive objects need the special `bindNull` workaround.