Update json-patch-duplex.js

If oldVal is object and newVal is string or any primitive type a TypeError is thrown by the Object.keys function.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys