             "map_options": mapOptions
         ])
 
-        if type != nil {
+        if let type = type {
             for f in type.filters {
                 result.addEntries(from: f.activeValue.info as! [AnyHashable: Any])
             }

            }
        }

        if let activeFilters = selection.activeFilters {
            for f in activeSubtype.type.filters {
                if let activeFilterValueTitle = activeFilters[f.title] {

                    if let v = f.possibleValues.filter({ a in

        selection.overlayIdentifier = activeOverlay.identifier

        var activeFilters = [String: String]()
        if let type = activeSubtype.type {
            for f in type.filters {
                activeFilters[f.title] = f.activeValue.title
            }
        }

        selection.activeFilters = activeFilters
