fix #6061: add a null check for abbrevTitleCache and titleCache in comparator