Prefer `when` over `if not nil`