Handle empty query terms