Safety change to json-patch-duplex.js

if oldVal is an object and newVal is a string or any other primitive type a typeError exception is thrown by the Object.Keys function.  This is a simple safety check to avoid the exception.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys