Handling empty query string