Replaces a ternary statement with an if statement.