Would [has_key](https://github.com/puppetlabs/puppetlabs-stdlib#has_key) work better here?