add safety check before table deletion in package uninstaller