public static bool IsAnyType(IType type) { var gp = type as IGenericParameter; return (null != gp && !gp.IsClass && !gp.IsValueType && 0 == gp.GetTypeConstraints().Length); }