Correctly detect empty search results