(a) An executory contract between a contractor and any subcontractor that is related to construction, alteration, or repair of a building, structure, or improvement may not waive or require the subcontractor to waive the right to:
(1) Claim a mechanics’ lien; or
(2) Sue on a contractor’s bond.
(b) A provision in an executory contract between a contractor and a subcontractor that is related to construction, alteration, or repair of a building, structure, or improvement and that conditions payment to the subcontractor on receipt by the contractor of payment from the owner or any other third party may not abrogate or waive the right of the subcontractor to:
(1) Claim a mechanics’ lien; or
(2) Sue on a contractor’s bond.
(c) Any provision of a contract made in violation of this section is void as against the public policy of this State.