boolean (@Nullable PsiElement element, @NotNull SearchScope migrationScope) { if (element == null) return false; return element.isValid() && element.isPhysical() && PsiSearchScopeUtil.isInScope(migrationScope, element); }