If we're rewriting code for style here, wouldn't replacing this with the functionally-equivalent case statement be better?