Every contract, agreement, promise or undertaking whether written or oral, express or implied between an employer and employee or prospective employee whereby either party promises or agrees not to join, become or remain a member of any organization or combination of employers or employees, or to withdraw from an employment relation in the event that he join, become or remain a member of any such organization or combination is declared to be contrary to public policy and wholly void and shall not provide or afford any basis for legal or equitable relief in any court.
N.J.S. § 34:12-5