check that DenseMatrix hsa enough storage on creation, throw exception if not.