A cheque is a contract in writing that enjoys the characteristic of negotiability but it must be founded on a reasonable cause in order to be valid and enforceable.
If the underlying transaction for which the cheque was given is voidable, illegal or is not performed, a claim by the payee for enforcement of the cheque will fail. If you try to enforce the cheque obligations, the validity of the underlying transaction will be relevant.
This was reaffirmed in an interesting judgment on the National Credit Act, Asmal vs Essa.