adding additional error check to httpRequest method

I was using the load method to request all the documents when I experienced an error related to the `type` property not available on the `$result->response` object when checking for errors at the end of the httpRequest method. I added an additional condition to check for the property existence before checking its value.