Design patterns·Who calls whom, and when
instead of returning null you returned something that implements the interface and does nothing, and the null checks disappeared.
Null object
Also callednull object pattern, no-op implementation, special case object
Supplying a valid object with neutral behaviour in place of a null reference, so callers do not have to branch. It works beautifully for collaborators with no meaningful absence — a no-op logger, an empty collection, a permissive policy — and badly where absence really is a case the caller must handle, because it turns a loud failure into a silent nothing. That is the line between it and an option type, which makes absence explicit rather than invisible.