Perform typecheck for (typechecking) builtin casts.