if ($html instanceof DialogueModal) {
                $html = $html->__toString(); 
            }