checking for null queries in PercolatorService