added NaN handling to RandomForest predict functions