Added checks for response

Checks added when response is null