Add TypeError catch method