I would prefer the use of `case...when...else...end` here.