Treat null query like undefined