Check for search query and exit if DNE