Add check in destructor.