Added null check for when material is null

MaterialInfo.toString() can now return null values if the material doesn't exist. This null check prevents materials that return null from being added.