 
         var instructionObject: NSDictionary
         let modesInstructions = instructions["modes"] as? NSDictionary
-        let typeInstructions = instructions[type?.description as Any] as! NSDictionary
-        if (mode != nil && modesInstructions != nil && modesInstructions![mode?.description as Any] != nil) {
+        let typeInstructions = instructions[type?.description ?? ""] as! NSDictionary
+        if mode != nil && modesInstructions != nil && modesInstructions![mode?.description as Any] != nil {
             instructionObject = modesInstructions![mode?.description as Any] as! NSDictionary
-        } else if (modifier != nil && typeInstructions[modifier!] != nil) {
+        } else if modifier != nil && typeInstructions[modifier!] != nil {
             instructionObject = typeInstructions[modifier!] as! NSDictionary
         } else {
             instructionObject = typeInstructions["default"] as! NSDictionary

                case "way_name": result += wayName
                case "destination": result += destination
                case "exit_number": result += exit
                    // TODO: Enable once rotary_name exposed in MBRouteStep
                // case "rotary_name": result += step.rotaryName ?? ""
                case "lane_instruction": result += laneInstruction ?? ""
                case "modifier": result += modifierConstant

            return nil
        }

        if instructions[type?.description ?? ""] as? NSDictionary == nil {
            // OSRM specification assumes turn types can be added without
            // major version changes. Unknown types are to be treated as
            // type `turn` by clients
