public static boolean isElseBlock(@Nullable PsiElement element) {
    if (element == null) return false;
    PsiElement parent = element.getParent();
    return parent instanceof PsiIfStatement && element == ((PsiIfStatement)parent).getElseBranch();
  }
public static boolean isElseBlock(@Nullable PsiElement element)