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

There's no need to call <code>lowercaseString</code> if we can use <code>NSStringCompareOptions</code> instead.
Moreover, this also fixes a crash when dealing with strings containing diacritics.