safety check in __del__