Setters/adders now throw ArgumentNullException appropriately.
diff --git a/src/ProtocolBuffers/FieldSet.cs b/src/ProtocolBuffers/FieldSet.cs
index a2e1912..bc2e2e7 100644
--- a/src/ProtocolBuffers/FieldSet.cs
+++ b/src/ProtocolBuffers/FieldSet.cs
@@ -413,7 +413,9 @@
/// element type, not whether it's a list.
/// </remarks>
/// <exception cref="ArgumentException">The value is not of the right type.</exception>
+ /// <exception cref="ArgumentNullException">The value is null.</exception>
private static void VerifyType(FieldDescriptor field, object value) {
+ ThrowHelper.ThrowIfNull(value, "value");
bool isValid = false;
switch (field.MappedType) {
case MappedType.Int32: isValid = value is int; break;