It's better to use a `case` statement here.