Support empty queries, make query option optional