Convert ternary operator to if/then/else/end block.