This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
// Protocol to check for Nil | |
protocol AnyOptional { | |
var isNil: Bool { get } | |
} | |
// Conforming nil check protocol to optional | |
extension Optional: AnyOptional { | |
var isNil: Bool { |