Synchronized isValueClass to avoid rare errors