Fixes an issue with dataTaskWithRequest: returning nil

If it returns nil, let's just return nil in
`dataTaskWithRequest:completionHandler:`

Fixes #1592