Every undertaking or promise made, whether written or oral, express or implied, is contrary to public policy and void and shall not afford any reason for granting legal or equitable relief, when constituted or contained in a contract or agreement of hiring or employment between an employer and an employee or prospective employee, whereby:
1. Either party to the contract or agreement undertakes or promises not to join, become or remain a member of any labor organization or of any organization of employers.2. Either party to the contract or agreement undertakes or promises that he will withdraw from the employment relation in the event he joins, becomes or remains a member of a labor organization or of an organization of employers.