sped up isScalar