The Synth.getAttribute() method is working, but you need a getAttribute() method for connected modules, which was indeed missing. I added it for all module types.
BTW, it is a bit more efficient (and more compact) to write toggle behavior like this:
MidiMuter.setAttribute(0, 1.0 - MidiMuter.getAttribute(0));
because you'll get away without branching...