     
     // re-entrant configuration lock, thanks to SCRecorder
     internal func beginConfiguration() {
-        if let session = self._captureSession {
-            self._sessionConfigurationCount += 1
-            if self._sessionConfigurationCount == 1 {
-                session.beginConfiguration()
-            }
+        guard let session = self._captureSession else {
+            return
+        }
+
+        self._sessionConfigurationCount += 1
+        if self._sessionConfigurationCount == 1 {
+            session.beginConfiguration()
         }
     }
     
     internal func commitConfiguration() {
-        if let session = self._captureSession {
-            self._sessionConfigurationCount -= 1
-            if self._sessionConfigurationCount == 0 {
-                session.commitConfiguration()
-            }
+        guard let session = self._captureSession else {
+            return
+        }
+        
+        self._sessionConfigurationCount -= 1
+        if self._sessionConfigurationCount == 0 {
+            session.commitConfiguration()
         }
     }
     
     internal func configureSessionDevices() {
-        guard self._captureSession != nil else {
+        guard let _ = self._captureSession else {
             return
         }
         

    /// Checks if focus lock is supported.
    public var isFocusLockSupported: Bool {
        get {
            if let device: AVCaptureDevice = self._currentDevice {
                return device.isFocusModeSupported(.locked)
            }
            return false

    /// The focus mode of the device.
    public var focusMode: NextLevelFocusMode {
        get {
            if let device = self._currentDevice {
                return device.focusMode
            }
            return .locked
        }
        set {
            self.executeClosureAsyncOnSessionQueueIfNecessary {
                guard let device = self._currentDevice,
                    device.isFocusModeSupported(newValue),
                    device.focusMode != newValue
                else {
                    return
                }
                
                do {
                    try device.lockForConfiguration()
                    device.focusMode = newValue
                    device.unlockForConfiguration()
                } catch {
                    print("NextLevel, focusMode failed to lock device for configuration")
                }
            }
        }
