diff --git a/src/voku/helper/AbstractSimpleHtmlDom.php b/src/voku/helper/AbstractSimpleHtmlDom.php
index fdc68a4..69cd664 100644
--- a/src/voku/helper/AbstractSimpleHtmlDom.php
+++ b/src/voku/helper/AbstractSimpleHtmlDom.php
@@ -180,7 +180,9 @@ public function __set($name, $value)
$value = (string)$value;
}
- return $this->node->{$nameOrig} = $value;
+ if (!is_null($value)) {
+ return $this->node->{$nameOrig} = $value;
+ }
}
return $this->setAttribute($name, $value);