A condition, precedent or subsequent, not complied with, insufficiency or failure of consideration, or any act of the opposite party, by which the obligation of the contract has ceased, may be pleaded as a defense. (Orig. Code 1863, § 2798; Code 1868, § 2806; Code 1873, § 2857; Code 1882, § 2857; Civil Code 1895, § 3707; Civil Code 1910, § 4301; Code 1933, § 20-902.)