1500. An obligation that depends upon a condition that is at the sole discretion of the debtor is null; however, if the condition consists in doing or not doing something, the obligation is valid, even where the act is at the discretion of the debtor.