Every undertaking or promise hereafter made, 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 or corporation, and any employee or prospective employee of the same, whereby (a) 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 organization of employers, or (b) either party to such contract or agreement undertakes or promises that he will withdraw from an employment relation in the event that he joins, becomes, or remains a member of any labor organization or of any employer organization, is hereby declared to be contrary to the public policy of the State of Illinois and wholly void, and it shall not be enforceable in any court and shall not afford any basis for the granting of legal or equitable relief by any court.
820 ILCS 15/1