Refactor: Extract stringOf() to base class