safer string replacement in comparison