keep toString if a type is used as customParams argument to trace
remove unused check_to_string function
check for toString when using `trace(abstract type)` on optimized Js