Better exception when missing type