added a code so that if the hessian was not invertible, it doesn't apply the r4ss function but produces NAs