We don't need those conditions since search() automatically doesn't do anything if the query isn't set.