dont throw on bad imports with a null document
diff --git a/lib/src/mirror_initializer.dart b/lib/src/mirror_initializer.dart
index 0d7ebb2..1e01b86 100644
--- a/lib/src/mirror_initializer.dart
+++ b/lib/src/mirror_initializer.dart
@@ -156,7 +156,7 @@
     // Validate any imports contained in this import, if the document hasn't yet
     // been seen.
     var importDoc = import.import;
-    if (!_documentsSeen.add(importDoc)) continue;
+    if (importDoc == null || !_documentsSeen.add(importDoc)) continue;
     _validatePackageImports(importDoc);
   }
 }