Fix TypeError on typename

Without casting to a string, in Python 2.7 you get:

> TypeError: unsupported operand type(s) for +: 'property' and 'str'