; (iii) compare the law or other regulation to whether and how other States regulate the applicable occupation; and (iv) if the applicable occupation is subject to an occupational licensing law, evaluate— (I) the feasibility of entering into reciprocity compacts with one or more other States to improve worker mobility and labor market flexibility; and (II) the advisability of endorsing occupational licenses granted by other States to spouses of active service military members as if those occupational licenses were granted by the State conducting the review. 6. Judicial review (a) In general The immunity under section 4(a) shall apply to any action of an occupational licensing board of a State, or any action of a member, officer, or employee of that board acting in the official capacity of that member, officer, or employee, if— (1) the actions of the occupational licensing board or member, officer, or employee are authorized by a non-frivolous interpretation of the occupational licensing laws of the State; (2) the State adopts a policy of using less restrictive alternatives to occupational licensing to address real, substantial threats to public health, safety, or welfare, in accordance with section 5(b); and (3) the State enacts legislation providing for judicial review of occupational licensing laws, in accordance with subsection (b) of this section. (b) Judicial review legislation Legislation enacted by a State under subsection (a)(3)— (1) shall— (A) prohibit the State and any occupational licensing board from imposing an occupational licensing law unless the State— (i) identifies an important government interest in protecting against real, substantial threats to public health, safety, or welfare; and (ii) demonstrates that the occupational licensing law is substantially related to achievement of the important government interest described in clause (i), in light of the availability of less restrictive alternatives to occupational licensing