Small performance improvements for JsValue handling.