`$validator instanceof CCompareValidator` can be used instead of comparing strings.