 
 public extension Array {
     /// SwiftRandom extension
-    public func randomItem() -> Element {
+    public func randomItem() -> Element? {
+        guard self.count > 0 else {
+            return nil
+        }
+
         let index = Int(arc4random_uniform(UInt32(self.count)))
         return self[index]
     }


public extension ArraySlice {
    /// SwiftRandom extension
    public func randomItem() -> Element {
        let index = Int.random(lower: self.startIndex, self.endIndex)
        return self[index]
    }

//  Copyright (c) 2015 Furkan Yilmaz. All rights reserved.
//

import UIKita

// each type has its own random

