             case .Sequence(let array) where array.count > index:
                 return array[index]
             default:
-                return .Null
+                return .Null(NSError(domain: SwiftyJSONErrorDomain, code: 0, userInfo: nil))
             }
         }
     }


import Foundation

//MARK:- Base
public enum JSON {
    

            case .Mapping(let dictionary) where dictionary[key] != nil:
                return dictionary[key]!
            default:
                return .Null(NSError(domain: SwiftyJSONErrorDomain, code: 0, userInfo: nil))
            }
        }
    }
