Add materials store null check into UuidGatherer code.