If you just don't define the puppetservice then you won't need to do the check for empty string.