public static boolean isForLoopUpdate(@Nullable PsiElement element) {
    if(element == null) return false;
    PsiElement parent = element.getParent();
    return parent instanceof PsiForStatement &&
           ((PsiForStatement)parent).getUpdate() == element;
  }
public static boolean isForLoopUpdate(@Nullable PsiElement element)