Added try/catch wrapper to `NSJSONSerialization dataWithJSONObject:`.
Throws an exception if not using valid JSON object.