export const getClassName = ( prop: T | undefined | null, lookup: Record ): string | undefined => { const isNullish = prop === undefined || prop === null; if (isNullish) return undefined; return lookup[prop]; };