Thanks Bep, for leading me to the right path. I moved the first parenthesis a one step to the right and it worked. The code is now:
{{ if isset .Params "categories" }}
{{ if not (in .Params.categories "Meta") }}
<!-- Hugo code here -->
{{ end }}
{{ end }}