diff --git a/lib/src/html/dom/element_subclasses.dart b/lib/src/html/dom/element_subclasses.dart
index 73fbd7c..bcd58b0 100644
--- a/lib/src/html/dom/element_subclasses.dart
+++ b/lib/src/html/dom/element_subclasses.dart
@@ -2749,7 +2749,7 @@ class StyleElement extends HtmlElement {
return null;
}
final text = this.text;
- final parsed = css.parse(text);
+ final parsed = css.parse(text??'');
final styleSheet = CssStyleSheet.constructor();
for (var node in parsed.topLevels) {
if (node is css.RuleSet) {