export const isObject = (value: unknown): value is Record => { return value !== null && typeof value === 'object' } export const isEmpty = (obj: unknown): boolean => { if (!isObject(obj)) return true return Reflect.ownKeys(obj).length === 0 && (obj as { constructor: unknown }).constructor === Object }