Fixes issue where error is thrown when socket returns valid response body of null