Don't let error fly if we try to handle a dialog but there is none present
Import menu to avoid errors when running only this module
Merge pull request #722 from weissjeffm/fixes1

Fixes: alert handling, import in shveta's PR