//
//  String+IsEmpty.swift
//  kt
//
//  Created by Assylkhan Rakhatov on 29.05.16.
//  Copyright © 2016 Alexandr Zalutskiy. All rights reserved.
//

import Foundation

protocol OptionalString {}
extension String: OptionalString {}

extension Optional where Wrapped: OptionalString {
  var isNilOrEmpty: Bool {
    return ((self as? String) ?? "").isEmpty
  }
}
