improve min/maxSize detection (is_integral instead of is_scalar)