Can't get custom meta fields to disappear if blank

One way to do this is by surrounding the parent div with an if statement like this:

{% if block.settings.content != blank or block.settings.page.content != blank %}
  
    
  

{% endif %}

Hope this helps!