bugfix (Nullpointer exception when closing
dialog without any input): if no name is provided, then the dialog is
closed