Throwing exception if log likelihood is NaN or Inf