Need to make sure the object has that method before calling it
Merge pull request #338 from vinu/fix_may_be_to_string

BUG: Need to make sure the object has that method before calling it