I don't mean to fault these answers, but the folks, in their Ivory Tower deciding what the language specifications should be, did a horrible job on the new "Optional" with regards to null values.
The language needs an isNullThenDefault(value, defaultValue) specification and NOT "orElse" (useless) or "isPresent" also equally useless.
These are useless because they don't offer an inline way of dealing with nulls only empty values. Well, no kidding, that doesn't help.
And the answer I get from the "board of directors" of the new language specifications is some ridiculous gobble-de-gook about "purity."
We need IfNullThenDefault that works regardless of datatype and NOT the lame "Objects.requireNonNullElse" which forces us to code for each datatype.
Sorry, but we need a new board of directors, because the current folks just aren't addressing the real problems we application programmers face every day.