check view exists before destroy()