public static bool IsNullOrEmpty(this string str) { // ReSharper disable once ReplaceWithStringIsNullOrEmpty return str == null || str.Length == 0; }