Handling no result query cases.