diff --git a/hazelcast-wm/src/main/java/com/hazelcast/web/WebFilter.java b/hazelcast-wm/src/main/java/com/hazelcast/web/WebFilter.java
index <HASH>..<HASH> 100644
--- a/hazelcast-wm/src/main/java/com/hazelcast/web/WebFilter.java
+++ b/hazelcast-wm/src/main/java/com/hazelcast/web/WebFilter.java
@@ -535,7 +535,8 @@ public class WebFilter implements Filter {
                 throw new NullPointerException("name must not be null");
             }
             if (value == null) {
-                throw new IllegalArgumentException("value must not be null");
+                removeAttribute(name);
+                return;
             }
             if (deferredWrite) {
                 LocalCacheEntry entry = localCache.get(name);
backport for issue #<I>