add optional argument to CompareStrings

this will be used when a specific input string should stay in the same
format like fractions when check the reduction