Fix bug where the extend function within Context does not handle data wi...

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 explicit null check in deep copy.

see: https://bugzilla.mozilla.org/show_bug.cgi?id=1057334