I experienced problems for iPad2 (native browser) using the former implementation, if n is no object and has no toString()-Method. So I replaced with String()

Additionally I feel it is better to avoid recursion here (which causes multiple calls of String-Constructor/toString()-Method) is better.