null and undefined mean a value is missing. With strict null checks, you must handle them. Use nullish coalescing (??) to pick a fallback only when the value is null or undefined.
const raw: string | undefined = undefined;
const safe = raw ?? "fallback"; // 'fallback'
Optional chaining (?.) helps when you want to read a property only if the value exists. Keep the rule simple: treat only null and undefined as missing.
Create a greeter that handles missing names.