Converts an if-then expression to an expression that uses a safe-access operator (if applicable)