rewrite isPlainObject