     if eleToCheck in elementsClaimed
       return true
 
-    for ele in eleToCheck.childNodes
-      if ele in elementsClaimed
-        return true
-
-      if this.checkChildrenClaimed(ele, elementsClaimed)
-        return true
-
-      return false
+    if eleToCheck != null
+      for ele in eleToCheck.childNodes
+        console.log("Checking child")
+        console.log(ele)
+        if ele in elementsClaimed
+          return true
+
+        if this.checkChildrenClaimed(ele, elementsClaimed)
+          return true
+
+    return false
 
   createAnnotation: (annotation = {}) ->
 


      # convert this to a range in the current document and extract the start and end points
      range = new xpathRange.SerializedRange(packager).normalize(document.body)

      start = range.start
      end = range.end

      .addClass('h-icon-chevron-left')

  checkChildren: (eleToCheck, elementsClaimed) ->
    elementsClaimed.push(eleToCheck)
    for ele in eleToCheck.childNodes
      elementsClaimed.push(ele)
      this.checkChildren(ele, elementsClaimed)
