[Densematrix] Explicitly cast '0' to field type to support user-defined field types