Check if element is in DOM