Checkpoint typed handles code to allow (more) type safe interop with C++.