Speedup in processing. Checking if a string needs to be modified before ...

...modifying it. Which is expensive. Gives some significant speed increase in the processing step