export default (val: V | null | undefined, def: () => V) => val ?? def();