I have created my own custom field type to generate the ‘duration’ property of the VideoObject schema by following the instructions on this page: https://rich-snippets.io/how-to-add-your-own-field-type/
My custom function essentially takes the unformatted duration from a custom field and converts it to ISO 8601 format. However, when the custom field is blank, the function returns no value (as expected). So the schema ends up displaying “duration”:null. Is there a way I can prevent the duration property from being generated when the custom function returns no value?