lld crash working with .lib import files

It's crashing here:

// Returns a string in the format of "foo.obj" or "foo.obj(bar.lib)".
std::string lld::toString(coff::InputFile *File) {
  if (!File)
    return "(internal)";
  if (File->ParentName.empty())
    return File->getName().lower();

Called from:
void SymbolTable::addFile(InputFile *File) {
  log("Reading " + toString(File));

If I add:

  if (File->ImportKind == coff::InputFile::ImportKind)
    return "(import)";
in the toString, it works fine

Repro file here:

https://1drv.ms/u/s!Au2nm7P_hgmasw-8bTrj15qtZ2pr

My question is, is my fix right?