Tweak isNewElt helper to not crash on non-element DOM nodes

* Found via eswiki:Liga_de_Campeones_de_la_EHF_2007-08 crasher
  in RT-testing from commit 3870f180

Change-Id: I05663230bc41d10fc8a90d8f8c39610fba2f5c17
Merge "Tweak isNewElt helper to not crash on non-element DOM nodes"