runtime typecheck for modules and adapters