Under strict null checking, T and null are distinct possibilities. A T | null value cannot be used as T without checking it.
The demo splits the value and null paths, then enables a method call only on the value path. A non-null assertion bypasses this check and shifts risk to runtime.
When to use
Use it when absence is a normal outcome, such as a lookup result or optional input.