Any undertaking or promise, whether written or oral, express or implied, constituting or contained in any contract or agreement of hiring or employment between any individual, firm, company, association, corporation, or limited liability company and any employee or prospective employee of the same, whereby:
1. Either party to such contract or agreement undertakes or promises not to join, become, or remain a member of any labor organization or of any employer organization; or2. Either party to such contract or agreement undertakes or promises that that party will withdraw from an employment relationship in the event that that party joins, becomes, or remains a member of any labor organization or of any employer organization, and any other undertaking or promise which is in conflict with the public policy of this state as declared in this chapter, is not enforceable in any court of this state and does not afford any basis for the granting of legal or equitable relief in any such court.