The way you work it is, of course, to put the money in a trust and specify that it not be disbursed until the happening of some condition (or, conversely, that it may be disbursed but will terminate upon the happening of some condition).
Laws vary from state to state, but generally a trust may be created for any purpose that is not contrary to public policy. In California, for example, the rule is that a trust can be created “for any purpose or purposes for which a contract may be made,” while in Texas the rule is that a trust may be for any any purpose “which is not illegal.”
A condition in a will by which an inducement is offered to a married person to obtain a divorce, or to live separate and apart from his/her spouse, is contrary to public policy and will not be upheld. (Note that some courts will make an exception if it is clearly understood that the money is supposed to be available to allow for the support of the person if he/she becomes divorced, but it cannot serve as an inducement to get divorced. Clear? Ha!)
A condition rendering a gift contingent on the beneficary not ever marrying anyone is void unless it is clearly motivated by an intention to provide support only until a marriage takes place.
Restraints limited as to person, group, or time are valid unless the remaining sphere of permissible marriage is so small that a permitted marriage is not likely to occur. Thus, a parent could leave a gift to a child conditioned on the child not marrying, say, out of the family faith, or not marrying a specific person, but couldn’t make it contingent on the child not ever marrying at all. Note, however, that restraints on remarriage may be liberally imposed. Therefore, a man may leave his widow a trust which will provide for her unless and until she remarries, which is terminable in favor of the children upon remarriage. (Yes, I know all about the fact that there are certain things the surviving spouse is entitled to regardless of what the will says.)
Now, I’m not going to go too far into the sitcom analysis, but it seems to me that since the provision in the will discussed in the Cheers show is not illegal nor against public policy, there would be no reason not to enforce it.
-Melin