typeof null returns 'object', so protect against null values here
Merge pull request #1 from acechase/fix-deep-copy-for-null-values

typeof null returns 'object', so protect against null values here