safer type deletion