Fixed object type not being cast to string and causing an issue with SQL
Merge branch 'JOINDIN-237' of git://github.com/stevangoode/joind.in