export function getString(input: Record, keys: readonly string[]): string | undefined { for (const key of keys) { const value = input[key]; if (typeof value === "string") return value; } return undefined; } export function isRecord(value: unknown): value is Record { return typeof value === "object" && value !== null; }