export const parseFromValuesOrFunc = ( fn: ((arg: U) => T) | T | undefined, arg: U, ): T | undefined => (fn instanceof Function ? fn(arg) : fn);