Added type check to TC.run