isScalar in Utils (tested) and support for scalar inner products and derivatives (tested).