The same null-or-special check repeats across multiple consumers — `customer === 'unknown' ? 'occupant' : customer.name` scattered across files.
A repeating null-or-special check becomes a Null Object (or Special Case) that responds sensibly to the same interface.
Before the refactoring
const name = customer === 'unknown' ? 'occupant' : customer.name;
After the refactoring
const name = customer.name; // UnknownCustomer.name returns 'occupant'
Every consumer must remember the check; behavior for the special case drifts as consumers diverge; bugs hide where one consumer forgot the check.
Adds a tiny class for one case; only worthwhile when the special case appears in 2+ consumers.
Callers stop branching on identity; the special behavior lives in one place.
Adding a Null Object (or Special Case) class for a special check used in only one place — creates a class for a one-off conditional.