Looks like this should be checking `response.resourceSets[0].resources.length` (see #1150).