Valid EXTRUDER value?

Printer Model: custom
MCU / Printerboard: BTT GTR
klippy.log.zip (1.3 MB)

I get this error when switching tools The value '' is not valid for EXTRUDER This happens when the macro SWITCH_EXTRUDER is called in the gcode. The macro is as follows
[gcode_macro SWITCH_EXTRUDER] description: Switch to whichever extruder isn't currently active gcode: _SWITCH_EXTRUDER
and the _SWITCH_EXTRUDER macro is as follows
[gcode_macro _SWITCH_EXTRUDER] description: Do not call directly gcode: {% if printer.toolhead.extruder == "extruder" %} T1 {% elif printer.toolhead.extruder == "extruder1" %} T0 {% else %} M117 SWITCH_EXTRUDER Failed - unsure which extruder is currently loaded {% endif %}
T0 macro
[gcode_macro T0] gcode: {% set svv = printer.save_variables.variables %} # Set svv to point to variable.cfg ARM_POSITION A={svv.left_ang} # Switch to T0 {% if "xyz" in printer.toolhead.homed_axes %} SET_GCODE_OFFSET X=0 SET_GCODE_OFFSET Y=0 SET_GCODE_OFFSET Z=0 {% endif %} ACTIVATE_EXTRUDER EXTRUDER=extruder G4 P2500
There is a valid value assigned to EXTRUDER in the T0, T1 macros.
I don’t know much about macros but I think I can see where variable values are assigned. I’m obviously missing something. In Superslicer the tool names are extruder and extruder1 This is to operate a Makertech dual switching hotend.

The T0 and T1 scripts work as expected, the SWITCH_EXTRUDER macro works as expected, that is it calls _SWITCH_EXTRUDER macro. I’m guessing that this part of _SWITCH_EXTRUDER macro, {% if printer.toolhead.extruder == "extruder" %} is not getting a valid value or a value of ’ '. How would I write a macro that just posts the value of printer.toolhead.extruder so I can see what value is actually being produced?