use type checkers in fit.R
#1182
+55
−55
Merged
fit.R
#1182