export function hasProperty( obj: unknown, key: K | null | undefined, ): obj is Record { return key != null && obj != null && typeof obj === 'object' && Object.hasOwn(obj, key) }