Fix breakage in query visitor for non-string values.