This strikes me as too long and complex for a ternary operator.