Implement if-then-else conditional expression.