Generalized type of `toHandle`