The object of a contract must be lawful when the contract is made, and possible and ascertainable by the time the contract is to be performed.
(Enacted 1872.)