exception on second run

Hi there,

I’m seeing an app that uses Ionic Services failing to display anything on second load (after a call).

It looks like the exception is thrown when Ionic Services tries to initialize and deserialize UserData. Specifically the first line below evaluates as true. But as I can see from the interactive console that the object in question,[x] (where x is “user_id”) is actually null. Therefore[“user_data”].__Ionic_DataTypeSchema throws and the app halts execution at this point:

                            // do we have a custom type?
                            if ([x].__Ionic_DataTypeSchema) {```

In short this is because `typeof (null === 'object')` is `true`.

If anyone has any ideas whether this is a bug, and if so how I can fix it I'll be very grateful.

Platform: Real iPhone 6, iOS 9, Ionic 1.1, Cordova iOS 3.9.1
No problems on desktop with ionic serve

<img src="//" width="690" height="236">

<img src="//" width="690" height="244">

Further to this, it would appear that setting (with a non-empty String) and calling is the cause of this. For some reason on iOS this is not populating the user_id property correctly on UserData.