Fix error when some properties of observed object are functions

I was trying to observe changes of an object in which some properties are functions. So `JSON.stringify(obj[key])` returns `undefined` and JSON.parse throws an exception.
Adding a test fix the exception.