diff --git a/src/main/java/com/couchbase/lite/Attachment.java b/src/main/java/com/couchbase/lite/Attachment.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/couchbase/lite/Attachment.java
+++ b/src/main/java/com/couchbase/lite/Attachment.java
@@ -201,7 +201,7 @@ public class Attachment {
             else if (value instanceof AttachmentInternal) {
                 throw new IllegalArgumentException("AttachmentInternal objects not expected here.  Could indicate a bug");
             }
-            else {
+            else if (value != null) {
                 updatedAttachments.put(name, value);
             }
         }
Update to pull request #<I> from b-smets -- looks like it cause another unit test to fail.  This change fixes that failure.