Check if view is null in isDialogOpen()