toString -- No longer working on server side, broke my app!

Hey guys, I have this function:

console.log("CONVERTING TO STRING...");
ClientSendTemplate = ClientSendTemplate.toString();
console.log("SUCCESS"); // DOES NOT WORK

What’s changed? I updated Meteor, foolishly. Why is this no longer working? I just shipped code to my production client, they’re not happy. I can’t find any info from Google either.

The toString() method convert a number to a string.
If your number is null, this will raise a TypeError.
You should verify first if your variable is defined, or use the new syntax:

ClientSendTemplate = ClientSendTemplate?.toString();

Note the question mark.

Can you provide more context, or possibly a reproduction of the problem?

Ahh false alarm guys, the client was submitting data in a new way, which caused the variable to be empty.

So of course replace won’t work! Thanks for being responsive, this community kicks butt.