I have an app on jquery 1.5 with dialogs worked fine. While I have a lot of .live handlers, I changed this to .on. For that, I have to update jquery (now 1.8.3 an jquerui 1.
The new jQuery UI version will not allow you to call UI methods on dialog which is not initialized. As a workaround, you can use the below check to see if the dialog is alive.
if (modalDialogObj.hasClass('ui-dialog-content')) {
// call UI methods like modalDialogObj.dialog('isOpen')
} else {
// it is not initialized yet
}