storage: handle_query_if