Every 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 or corporation and any employee or prospective employee of the same, whereby (a) any employee or prospective employee undertakes or promises to join, become or remain a member of a company union; or (b) either party to such contract or agreement undertakes or promises not to join, become, or remain a member of any labor organization or any organization of employers; or (c) either party to such contract or agreement undertakes or promises that he will withdraw from the employment relation in the event that he joins, becomes or remains a member of any labor organization or of any organization of employers, is hereby declared to be contrary to public policy and wholly void and shall not afford any basis for the granting of legal or equitable relief by any court against a party to such undertaking or promise, or against any other persons who may advise, urge or induce, without fraud, violence, or threat thereof, either party thereto to act in disregard of such undertaking or promise.
N.Y. Gen. Oblig. Law § 5-301