Correctly handle empty filter queries