prevent insert nil into NSDictionary

Prevent potential crash when sending `nil` as responseData.