[add] if statement snippet

Add a useful snippet.