void () { Object res = get(); if (res == null) return; if (res instanceof PsiElement) { if (!((PsiElement)res).isValid()) return; } else if (res instanceof ComponentManager) { if (((ComponentManager)res).isDisposed()) return; } myDelegate.run(); }