public static PsiTypeElement getTypeElementToExpand(PsiVariable variable) {
    PsiTypeElement typeElement = variable.getTypeElement();
    if (typeElement != null && typeElement.isInferredType()) {
      PsiType type = variable.getType();
      if (PsiTypesUtil.isDenotableType(type, variable)) {
        return typeElement;
      }
    }
    return null;
  }
public static PsiTypeElement getTypeElementToExpand(PsiVariable variable)