If ```metadata_category``` isn't in the mapping file, this will raise a ```KeyError```. Can you add a check for this?