More robustly check if DOMElement is undefined when unbinding listenToDOM.