shared with support.  also cleaned up type handling on the ValueComparator