Fix incorrect condition for empty response check