I can't quite remember, as I wrote that bit around two years ago, but it might've been necessary in order for the CraftCustomInventory subclasses to compile? Though I suppose they could override to return null instead.