Using built-in options to handle string comparison and also fixing a crash when dealing with strings containing diacritics