Unload: Added control if type def exists for a table to unload. Fixes #2070.