Only search if a query was inputted