Fixes #5452 - Make sure nil is not part of the keys in Puppet resource