Check if the given value is a plain object.
@param {*} value - The value to check.
@returns {boolean} Returns `true` if the given value is a plain object, else `false`.
function isPlainObject(value) {
  if (!isObject(value)) {
    return false;
  }

  try {
    var _constructor = value.constructor;
    var prototype = _constructor.prototype;
    return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf');
  } catch (error) {
    return false;
  }
}