             
             return cleanedType == cleanedRecordedArgType
         case .InstanceOfWith(let input):
-            let isRecordedArgAnOptional = "\(recordedArg.dynamicType)".indexForMatching(regex: "^Optional<") != nil
+            let isRecordedArgAnOptional = isOptional(recordedArg)
             let passesOptionCheck = (input.option == ArgumentOption.Anything) ||
                                     (input.option == ArgumentOption.NonOptional && !isRecordedArgAnOptional) ||
                                     (input.option == ArgumentOption.Optional && isRecordedArgAnOptional)

            if let recordedArgAsObject = recordedArg as? AnyObject {
                return recordedArgAsObject.isKindOfClass(type)
            }
            
            return false
        }
    } else {

}

private func isNil(value: Any) -> Bool {
    let mirror = Mirror(reflecting: value)
    let hasAValue = mirror.children.first?.value != nil
    
    return mirror.displayStyle == .Optional && !hasAValue
}

private func isOptional(value: Any) -> Bool {
    let mirror = Mirror(reflecting: value)
    
    return mirror.displayStyle == .Optional
}

private func descriptionOfCalls(functionList functionList: Array<String>, argumentsList: Array<Array<Any>>) -> String {
