I would replace the ToUpper or ToLower calls to their Invariant versions: String.ToUpperInvariant Method (System) | Microsoft Docs
Similar things can happen to Equals.
I would replace the ToUpper or ToLower calls to their Invariant versions: String.ToUpperInvariant Method (System) | Microsoft Docs
Similar things can happen to Equals.