typing: handle `a == null` when `a` is null