public static boolean isString(@NotNull PsiType type) {
    if (type instanceof PsiClassType) {
      // optimization. doesn't require resolve
      final String shortName = ((PsiClassType)type).getClassName();
      if (!Objects.equals(shortName, CommonClassNames.JAVA_LANG_STRING_SHORT)) return false;
    }
    return CommonClassNames.JAVA_LANG_STRING.equals(type.getCanonicalText(false));
  }
public static boolean isString(@NotNull PsiType type)