returnConstantOrMatrix ==> promoteScalarToMatrix