dot-hess_to_cov function

helper function to safely convert a Hessian matrix to covariance matrix