Fixing angular crash on <object> in DOM, which doesn't necessarily have a childNodes attribute