fix null type access (#1940)

* fix null type access

* fix check
diff --git a/lib/src/rules/unrelated_type_equality_checks.dart b/lib/src/rules/unrelated_type_equality_checks.dart
index e193054..12cdfa9 100644
--- a/lib/src/rules/unrelated_type_equality_checks.dart
+++ b/lib/src/rules/unrelated_type_equality_checks.dart
@@ -177,7 +177,7 @@
 
   @override
   void visitBinaryExpression(BinaryExpression node) {
-    final isDartCoreBoolean = node.staticType.isDartCoreBool;
+    final isDartCoreBoolean = node.staticType?.isDartCoreBool ?? false;
     if (!isDartCoreBoolean ||
         (node.operator.type != TokenType.EQ_EQ &&
             node.operator.type != TokenType.BANG_EQ)) {