Fix bug where the extend function within Context does not handle data with null values correctly. 

In Javascript typeof null === "object" despite null not being a proper object. The code assumes (during a deep copy) that anything that has typeof 'object' in javascript is an Object. 

Fixed by explict null check.

see: https://bugzilla.mozilla.org/show_bug.cgi?id=1057334