I have a field where I enter a YouTube URL, and a template where I get that dynamic field. If the field is empty the template will render that iframe with an empty value, si I have a huge white space on the front-end.
to which I replied:
You could add a custom shortcode that returns the enclosed content if the field has a value and use it in a Shortcode Wrapper element.