remove reliance on __toString()
Merge pull request #166 from sonata-project/remove_to_string

remove reliance on __toString()