     fileprivate let stringProperty: String
     
     fileprivate static func fromMap(_ value: Any?) throws -> ConvertibleObject {
-        return ConvertibleObject(stringProperty: value as! String)
+        guard let string = value as? String else {
+            throw ConvertibleError(value: value, type: String.self)
+        }
+        
+        return ConvertibleObject(stringProperty: string)
     }
 }
 

class KeyedMapper_ConvertibleSpec: QuickSpec {
    override func spec() {
        describe("from<T: Convertible> -> T") {
            it("should correctly map") {
                let dict: NSDictionary = ["convertibleProperty" : ""]
                let mapper = KeyedMapper<Model>(JSON: dict, type: Model.self)
                let convertibleThing: ConvertibleObject = try! mapper.from(.convertibleProperty)
                
                expect(convertibleThing).toNot(beNil())
            }
        }
        

                }
            }
        }
        
        describe("from<T: Convertible> -> T?") {
            context("when the fromMap implementation throws an error") {
                it("should return nil") {
                    let expectedValue = 2
                    let dict: NSDictionary = ["convertibleProperty" : expectedValue]
                    let mapper = KeyedMapper<Model>(JSON: dict, type: Model.self)
                    let convertibleThing: ConvertibleObject? = mapper.optionalFrom(.convertibleProperty)
                    
                    expect(convertibleThing).to(beNil())
                }
            }
            
            context("when the fromMap implementation does not throw an error") {
                it("should correctly map") {
                    let dict: NSDictionary = ["convertibleProperty" : ""]
                    let mapper = KeyedMapper<Model>(JSON: dict, type: Model.self)
                    let convertibleThing: ConvertibleObject? = mapper.optionalFrom(.convertibleProperty)
                    
                    expect(convertibleThing).toNot(beNil())
                }
            }
        }
        
        describe("from<T: Convertible> -> [T]?") {
            context("when the value cannot be casted to an array of Any") {
                it("should return nil") {
                    let dict: NSDictionary = ["convertibleArrayProperty" : [:]]
                    let mapper = KeyedMapper<Model>(JSON: dict, type: Model.self)
                    let convertibleArray: [ConvertibleObject]? = mapper.optionalFrom(.convertibleArrayProperty)
                    
                    expect(convertibleArray).to(beNil())
                }
            }
            
            context("when the value can be casted to an array of Any") {
                it("should map correctly") {
                    let expectedValue = [""]
                    let dict: NSDictionary = ["convertibleArrayProperty" : expectedValue]
                    let mapper = KeyedMapper<Model>(JSON: dict, type: Model.self)
                    let convertibleArray: [ConvertibleObject]? = mapper.optionalFrom(.convertibleArrayProperty)
                    
                    expect(convertibleArray).toNot(beNil())
                    expect(convertibleArray?.count) == expectedValue.count
                }
            }
        }
    }
}
