Check if there is query result before getData