nullish(): provide a fallback for missing values
nullish(a, b) returns a when it is present and otherwise returns b. It is useful when a calculation accepts optional settings, data fields, or defaults.
Missing is not zero
Nullish behavior is deliberately different from ordinary Boolean fallback: zero, false, and an empty string can be meaningful values and should normally remain intact. Use it to supply a default only for null-like absence.
Practical use
Pair nullish() with isNumeric() when a default must still be numeric, format() for display, and equal for a fuller branch. Use isZero() if zero needs special treatment.
Caveat
Decide whether absent, empty, and invalid inputs mean different things in your model before applying one fallback rule.