         }
         object.map(with: Wrapping(propertyDictionary))
     }
-    internal class func handleForNilValue(isOptional: Bool) throws {
-        if !isOptional {
-            throw MapperError.notFound
-        }
+}
+//MARK: - Helpers 
+extension Mapper {
+    internal class func searchType(for path: [MapPathable]) throws -> MapperSearchType {
+        if path.isEmpty {
+            return .recursive
+        }
+        let isContainsTargetPaths = path.contains { (path) -> Bool in
+            switch path {
+            case .target:
+                return true
+            default:
+                return false
+            }
+        }
+        let isContainsDestination = path.contains { (path) -> Bool in
+            switch path {
+            case .destination:
+                return true
+            default:
+                return false
+            }
+        }
+        let isContainsNone  = path.contains { (path) -> Bool in
+            switch path {
+            case .none:
+                return true
+            default:
+                return false
+            }
+        }
+        if isContainsNone {
+            if isContainsTargetPaths || isContainsDestination {
+                throw MapperError.wrongFormat
+            }
+            return .recursive
+        }
+        if isContainsTargetPaths {
+            if isContainsDestination {
+                return .determined
+            } else {
+                throw MapperError.wrongFormat
+            }
+        }
+        if isContainsDestination {
+            if !isContainsTargetPaths {
+                return .recursiveWithDestination
+            }
+        }
+        return .determined
     }
 }
 

//        }
//        throw MapperError.wrongFormat
//    }
    internal class func searchType(for path: [MapPathable]) throws -> MapperSearchType {
        if path.isEmpty {
            return .recursive
        }
        let isContainsTargetPaths = path.contains { (path) -> Bool in
            switch path {
            case .target:
                return true
            default:
                return false
            }
        }
        let isContainsDestination = path.contains { (path) -> Bool in
            switch path {
            case .destination:
                return true
            default:
                return false
            }
        }
        let isContainsNone  = path.contains { (path) -> Bool in
            switch path {
            case .none:
                return true
            default:
                return false
            }
        }
        if isContainsNone {
            if isContainsTargetPaths || isContainsDestination {
                throw MapperError.wrongFormat
            }
            return .recursive
        }
        if isContainsTargetPaths {
            if isContainsDestination {
                return .determined
            } else {
                throw MapperError.wrongFormat
            }
        }
        if isContainsDestination {
            if !isContainsTargetPaths {
                return .recursiveWithDestination
            }
        }
        return .determined
    }
//    internal class func map(_ json: AnyObject?, type: Mapable.Type) throws -> [Mapable] {
//        throw MapperError.wrongFormat
//    }

    //Detecting last level of JSON Tree
    internal class func isContainsOnlyAtomaryValues(_ json: AnyObject) -> Bool {
        var nodesToCheck = [AnyObject]()
        if let jsonDictionary = json as? [String: AnyObject] { nodesToCheck = jsonDictionary.values.map {$0 as AnyObject} }
        if let jsonArray = json as? [AnyObject] { nodesToCheck = jsonArray }
        for node in nodesToCheck {
            if node is Dictionary<String, Any> || node is Array<Any> { return false }
        }
