added the handling on the client: check whether the query response is empty or not