raise typeerror if bad yaml