Normalize toString methods

This will also fix issues when name is not a string.