Adding code to check that export type matches As type