Hi,
You can check first of the return status of the fit result is zero. If it is zero it means the fit converged… It could be that the result is not good because the function model does not represent the histogram. Then you need to check if the chi2 value is reasonable, i.e… close to 1 when divided by the number of degree of freedom