changed NA to more appropriate NULL if no model to calculate.