check node exists before unregister it.