Magic toString for typecasting