type2name takes a SEXP an not an int, similar to Rcpp 0.10.7