Added exception when module types are defined but not used.