internal static object SecureCreateInstance(Type type, object[] args) { if (type == null) { throw new ArgumentNullException(nameof(type)); } return Activator.CreateInstance(type, args); }