added type checking on imoport and export