No need to use an if statement. If no special characters are in the input string (I called it YourOriginalString) then there is nothing to replace and your output string (I called it YourUpdatedString) will stay exactly the same.
As it’s written above, it goes into an assign activity. YourUpdatedString is a string variable - this is a newly created variable which is the original string, but with special characters replaced with underscores. YourOriginalString is also a string variable - this is the original string that may contain special characters. Those were variable names i made up, you can name them anything you’d like.