Your heirs would sell it to a legal purchaser. If held in a trust, the trust would receive the money and it would be distributed in accordance with the trust. If not held in a trust, I'd assume that your heirs would receive the money directly. From what I've read, it's a common concern and the law is quite settled and surprisingly straightforward. Or as straightforward as anything to do with money and inheritance can be.
NRA Endowment & DSC Lifer