         
         switch action {
         case #selector(resetTextSize(_:)):
-            return (self.textView?.scale != 1.0)
+            return (self.textView.scale != 1.0)
             
         default:
             return true

    
    init(textView: NSTextView, forPressAndHold: Bool = false) {
        
        super.init()
        
        NSTouchBar.isAutomaticValidationEnabled = true
        
        self.textView = textView
        self.delegate = self
        self.defaultItemIdentifiers = forPressAndHold ? [.textSizeSlider] : [.textSizeActual, .textSizeSlider]
        

    /// validate text size slider in touch bar
    @objc private func invalidateSlider(_ notification: Notification) {
        
        guard let item = self.item(forIdentifier: .textSizeSlider) as? NSSliderTouchBarItem else { return }
        
        item.slider.doubleValue = Double(self.textView.scale)
    }
    
}
