private static boolean isSafeToDelete(@NotNull PsiElement element, boolean isMethodUsage) {
      if (isMethodUsage) {
        if (element instanceof PsiLambdaExpression) {
          return LambdaCanBeReplacedWithAnonymousInspection.isConvertibleLambdaExpression(element);
        }
        if (element instanceof PsiMethodReferenceExpression) {
          // todo check if we can convert method ref to anonymous class
        }
      }
      return false;
    }
private static boolean isSafeToDelete(@NotNull PsiElement element, boolean isMethodUsage)