The marriage of real-estate scions Ivanka Trump and Jared Kushner had people speculating about the cost of her Vera Wang gown, seating arrangements at the power-packed reception—and the length of the prenuptial agreement.

A ‘prenup’ is a legal contract, signed prior to a marriage or civil union, that outlines provisions for spousal support and the division of assets in the event of divorce or separation. A postnuptial agreement is basically the same, but occurs during a marriage.

Many balk at the idea of a pre- or postmarital agreement. “Obviously, some people think it’s not in the proper spirit of share-and-share-alike,” says Sam Hais of Hais, Hais, Goldberger & Coyne. But not so obvious are the reasons that make these agreements advisable. “Robert Frost had the right idea when he wrote, ‘Good fences make good neighbors,’” Hais says. “A pre- or postnup, properly and lawfully done, can solve problems and settle issues once and for all and remove them from the arena of marital argument.”

Hais notes that a thorough, detailed pre- or postnuptial agreement is less vulnerable to challenge in the event of divorce. “Be careful to dot the t’s and cross the i’s, right down to deciding who pays the property tax on divvied-up properties,” he says. “If you intend to keep certain aspects of your assets or property separate, make those arrangements from the very beginning.”

Many people don’t realize that interest and dividends from separate property can be considered marital property unless specifically addressed in a prenuptial agreement, Hais says. “So consult a qualified legal professional, keep separate bank accounts for interest and dividends, and maintain careful records throughout the marriage. And whatever you do, don’t spring a prenup on your intended the night before the wedding with the words, ‘sign this or the wedding’s off.’” Besides being bad form, “that’s considered coercion and can invalidate the agreement,” Hais says.

The same legal conditions apply to pre- and postnups, notes attorney Susan Roach of The Roach Law Firm: full disclosure of each party’s assets and separate counsel for each party. “A prenup makes sense whenever you have assets to protect, even if you’re not as wealthy as a Trump,” Roach says. “Postnups are usually used to settle financial changes that occur after the marriage—for example, removing a business from the table in the event of a divorce. The arrangements are more common than they used to be, especially in second or third marriages where one or both parties have children from other relationships or have accumulated significant wealth prior to or during the marriage.”

Despite precautions, “prenups aren’t as sacred as they used to be,” Roach says. “A change in case law a few years ago meant that, in the event of the relationship’s dissolution, the court can examine the prenup and determine if it’s conscionable, or fair. This makes sense in cases where the financial circumstances of one or both parties have changed dramatically during the marriage, creating an inequity.”

Margo Green of Green, Cordonnier & House supports prenuptial agreements, particularly if one partner goes into a marriage making a lot more than the other or stands to inherit a great deal of money. “However, even an ironclad prenup can be challenged under certain circumstances,” she cautions. “Say that a wife waives maintenance when she signs the agreement. Ten years later, she gets hit by a bus and is completely paralyzed. Her husband wants to divorce her and stick to the original agreement. In that case, a judge will often set the agreement aside and make a more equitable arrangement.”

Green doesn’t see many postnuptial agreements in her Clayton practice. “I get maybe one or two a year,” she says. “They don’t usually hold up in court; judges don’t like them,” she says. “OK, so conditions change during your marriage and you start making a lot more money. Does that mean you don’t want to share it with your spouse? It hardly seems fair.”

Prenups and postnups aren’t the only way to handle substantial assets, notes Don Singer of The Singer Law Firm. “Parents who want to leave a great deal of money to their children and make sure they hang onto it after a divorce should set aside that money in a protective or spendthrift trust, long before their children are ready to marry,” he says. “Estate planners and asset protection managers can deal with the situation in ways that aren’t as blunt as a prenup or postnup.”

Singer, who focuses on estate planning and wealth and asset protection, recalls an incident in which a young woman actually broke off the engagement when her fiance asked her to sign a prenup. “There was a lot of bitterness and ugliness that could have been avoided,” he says. “Consult competent legal counsel and protect your assets long before your kids start dating. That way, you can always blame it on the lawyer!”