Add isQuery method