fix for nil metafields
fix for nil metafields