mixed ToPrimitive(input:mixed, PreferredType:String=undefined)
Converts an object to a primitive value. Any input that's already a primitive will not be changed. the PreferredType is optional and the second parameter to [[DefaultValue]].
function ToPrimitive(input, PreferredType){
if (typeof input != 'object') return input;
return input.[[DefaultValue]](PreferredType);
}