internal static bool IsArrayOrList(Type listType) { return (listType.IsArray || (listType.IsGenericType && (listType.GetGenericTypeDefinition() == typeof(List<>)))); }