A contract is null and void if it contradicts the constitution, mandatory regulations, or morality. Nullity also arises due to an improper subject matter, an unlawful basis, an impermissible motive, a legally incapable party, a sham (simulated) contract, or an incorrect form.162 A null and void contract is invalid from the beginning, meaning it has no legal effect, as if the contract never existed. It does not create any legal obligations or rights between the parties. The parties must return any benefits received.163 The court examines nullity ex officio, and any interested party may invoke it.164 The right to claim nullity never expires.165 It is determined by a declaratory judgment.