Protect against ‘null’ for trams response object

I sent one solution to this crash in #1, but here's another crack at a solution, using a category on `NSObject` instead of adding the check into the provider itself.