function isAlmostPlainObject(o) {
  if (isPlainObject(o)) {
    return true
  }
  const proto = o && Object.getPrototypeOf(o)