Added a condition when the query text was empty, so that there was a
warning to the user on "empty query"