Add a cast check.