private static bool Equals(string value1, string value2) { if (value1 == null) { return string.IsNullOrEmpty(value2); } return value1.Equals(value2); }