Made the text drawing support non-strings

Accidentally passing of a number to the text of an element produces a
very nondescript error, which made debugging an extremely lengthy
process.

Instead, I changed the code to accept any type of object (although
string is still preferred). It will automatically call the object's
`toString()` function when converting for the canvas.