Invert Condition

Negate the condition of an if-statement and swap the content of the if and else blocks.

refactoring
safe