Add a proper error message for empty searches.