Replaces ternary expression with if statement.