Added a fix for NPE caused by empty response (for example network relate...

...d)

Together with @achudzik we've added a possible fix for the NPE caused by network issues.