Prefer `if` to `when` unless there are side-effects.