             withUnsafeMutablePointer(&self.spinlock, OSSpinLockUnlock)
             
             //
-            self.deferredClosures?.forEach { $0() }
-            self.deferredClosures = nil
+            if let deferredClosures = self.deferredClosures {
+                deferredClosures.forEach { $0() }
+                self.deferredClosures = nil
+            }
         }
         
         // assert(self.value == nil && self.error == nil, "value or error can be assigned only once.")

    }
    
    public func didCancel(callbackQueue: NSOperationQueue? = NSOperationQueue.mainQueue(), closure: () -> Void) -> Self {
        self.addDeferredClosure {
            if let callbackQueue = callbackQueue {
                callbackQueue.addOperationWithBlock {
                    if self.cancelled {
                        closure()
                    }

extension NonFailableTask {
    
    public func didFinish(callbackQueue: NSOperationQueue? = NSOperationQueue.mainQueue(), closure: (V) -> Void) -> Self {
        let queue = callbackQueue ?? NSOperationQueue.currentQueue()

        self.addDeferredClosure {
            if let queue = queue {
                queue.addOperationWithBlock {
                    closure(self.value)
                }
            }
