Prevent search with blank query.