If a dialog isn't open, it doesn't exist. If you're both talking about dialog tables, it's a different matter (and something the OP should have explained, along with what $ismenu is supposed to do).