2340. Suretyship may be contracted only for a valid obligation.
It may be for the fulfilment of an obligation from which the principal debtor may be discharged by invoking his incapacity, provided the surety is aware of this, or the fulfilment of a purely natural obligation.