Handle empty query params correctly