public static bool HasBaseType(this System.Type type, System.Type checkType) { return(type.GetBaseClassesAndInterfaces().Any(x => x == checkType)); }