Better checking if element is on dom or not.