Adds attr __name__ for type

Adds __name__ for type.