Hmm... good question. I'm not sure, but believe that the mosaic plugin might (as in, it has the information necessary to do so). Anyways, a string comparison is consistent with how custom dimensions are treated in the rest of the code base, so for the time being it's ok to make string comparisons.