draggableDestroy throws errors when nothing draggable?

draggableDestroy throws errors when nothing draggable?


I get the javascript error inlined below, when making the following
invocation...
$("#script .tile.rect").draggableDestroy(); //reset all draggable
behaviour
The reason I'm calling draggableDestroy() for this group of elements
is to remove all draggable behaviour IF such elements exist, and if
any of them are draggable. It's a means for me to reset all draggable
behaviour, and then reconstruct the draggable behaviour from scratch
in a way which is appropriate for the current state of the page.
However, it seems that if no draggable behaviour yet exists, it
throws a terminal error. Presumably this is a bug.
Any suggestions for checks I can make before calling
draggableDestroy() as a workaround, without me messing about with the
source of JQuery-UI.
Version information is visible in the file paths reported in the
error...