a materials array with entries that are 'None'. Added some code to check for this perverse situation.