As a convention, I think it might be better to pass dPdu for the unused tangent in the isotropic case, so that if somebody returns to the shader later and changes the roughness parameters to possibly be different, they won't accidentally have a meaningless vector.

I also think we might consider making a second microfacet entry point, defined inline, as

    closure color microfacet (string dist, normal N, float a, float eta, int refract) {
        return microfacet (dist, N, dPdv, a, a, eta, refract);
    }