prevents user from searching with empty query