How can I hide blank metafields on my product page?

I’ve added the code, but did i do something wrong? It’s just showing the entire code instead:

I’ve added the liquid code to multicolumn as instructed: