packages/material-ui-utils/src/deepmerge.ts/isPlainObject
export function isPlainObject(item: unknown): item is Record<keyof any, unknown> {
  return (
    item !== null &&
    typeof item === 'object' &&
    // TS thinks `item is possibly null` even though this was our first guard.
    // @ts-expect-error
    item.constructor === Object
  );
}