replacing StupidCastErrorNode with TypeErrorNode