the element may not have metadata, so add a check