in smart pointer support, throw if toIntermediate is called on an unset smart pointer