Fix a CHECK() condition to avoid a null reference

It's possible that the InterestInvokerData is null, in the case
that we're losing hover on something that never triggered this
target element in the first place. So avoid crashing in the check.

Bug: 326681249
Change-Id: I3cc38c576a3349e8db24b4b5fc2e428bd88df08b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6219809
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1414219}
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc
index 2b0157f6..bac20e5 100644
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -10528,7 +10528,8 @@
         //    schedule an InterestLost task. Any existing InterestLost tasks
         //    would have been cancelled (above) when this element was hovered.
         // Note that an element can be both an interest invoker and a target.
-        CHECK(!upstream_invoker->GetInterestInvokerData()
+        CHECK(!upstream_invoker->GetInterestInvokerData() ||
+              !upstream_invoker->GetInterestInvokerData()
                    ->hasInterestGainedTask());
         if (!upstream_invoker->IsHovered()) {
           upstream_invoker->ScheduleInterestLostTask();