Avoiding NullReference Exceptions.

I received a null response to the request which gave me a NullException. Currently wrapping the response object in null checks to prevent this exception.