Make sure there is a relation_metadata before using it