Changed to check if toString exists and use that instead of just converting Number types to string.