Could be rewritten as 
if ( jQuery.ui  && jQuery.ui.draggable ) {