check if the element has been initialised before destroying it