private static @NotNull FileType getFileTypeOrUnknown(@Nullable FileTypeWithDescriptor ftd) {
    return ftd == null ? UnknownFileType.INSTANCE : ftd.fileType();
  }
private static @NotNull FileType getFileTypeOrUnknown(@Nullable FileTypeWithDescriptor ftd)