Don't actually need to check nil res, because no code will actually try to access res when it's nil anyway. And the 'return' at the of the function will catch it when the response times out.