Explicitly check for numeric errors in optimizer, CModel