For each of these, can just do `if @variable`. See http://docs.puppetlabs.com/guides/templating.html#testing-for-undefined-variables.