Handle when the query is undefined.