[Fix #218] Don't perform search query if query is empty