Put that CHECKCAST in the right place