Only strip bad chars if a string.