Add toggle defun utility