Replace null with undefined in moveToVisibleArea

Extracted from Change 287384.

Change-Id: I7a5ce7ed18a90962fd049894747274012450ce1e
diff --git a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.ts b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.ts
index 16bb61f..001bafc 100644
--- a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.ts
+++ b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.ts
@@ -156,8 +156,8 @@
       : this.targetableStops;
     const windowCenter = Math.round(window.innerHeight / 2);
 
-    let closestToTheCenter: HTMLElement | null = null;
-    let minDistanceToCenter: number | null = null;
+    let closestToTheCenter: HTMLElement | undefined = undefined;
+    let minDistanceToCenter: number | undefined = undefined;
     let unobservedCount = filteredStops.length;
 
     const observer = new IntersectionObserver(entries => {
@@ -179,7 +179,7 @@
           Math.round(entry.boundingClientRect.height / 2);
         const distanceToWindowCenter = Math.abs(center - windowCenter);
         if (
-          minDistanceToCenter === null ||
+          minDistanceToCenter === undefined ||
           distanceToWindowCenter < minDistanceToCenter
         ) {
           // entry.target comes from the filteredStops array,