Return null as error body when response is absent

Was throwing an NPE for lack of null check on response before trying to
access the given response body.

Fixes #488