(b) Notwithstanding the provisions of subdivision (a) of this rule, the court shall not stay or dismiss any action on the ground of inconvenient forum, where the action arises out of or relates to a contract, agreement or undertaking to which section 5-1402 of the general obligations law applies, and the parties to the contract have agreed that the law of this state shall govern their rights or duties in whole or in part.