public static void appendTypeString(
     StringBuilder buffer, final PsiType type, PsiElement context) {
   if (type != null) {
     JavaDocInfoGenerator.generateType(buffer, type, context);
   } else {
     buffer.append(GrModifier.DEF);
   }
 }
 public static void appendTypeString(
     @NotNull StringBuilder buffer, @Nullable PsiType type, PsiElement context) {
   if (type instanceof GrTraitType) {
     generateTraitType(buffer, ((GrTraitType) type), context);
   } else if (type != null) {
     JavaDocInfoGenerator.generateType(buffer, type, context);
   } else {
     buffer.append(GrModifier.DEF);
   }
 }