private static PsiType getType(PsiModifierListOwner declaration) {
        if (declaration instanceof PsiVariable) {
            return ((PsiVariable) declaration).getType();
        }
        if (declaration instanceof PsiMethod) {
            return ((PsiMethod) declaration).getReturnType();
        }
        return null;
    }
private static PsiType getType(PsiModifierListOwner declaration)