private static boolean isValidVariableType(PsiType type) {
    if (type instanceof PsiClassType ||
        type instanceof PsiArrayType ||
        type instanceof PsiPrimitiveType && !PsiTypes.voidType().equals(type)) {
      return true;
    }
    return false;
  }
private static boolean isValidVariableType(PsiType type)