Check runtime types of modules in JS