private T GetOverriddenProperty <T>(string name) { var o = GetOverrideProperty(name); if (o != null && typeof(T) == typeof(string)) { var os = o as string; if (os == null) { // if 'o' is of a different type - e.g. an Enum o = Override.GetPropertySafely(name) as string; } else { // in case of string.Empty if (string.IsNullOrEmpty(os)) { o = null; } } } return((o == null) ? (T)base.GetProperty(name) : (T)o); }