handle user cancel without running code and only then erroring out

the input dialog returns None if the dialog was canceled