Fix querying with non-strings e.g. integer values