Apparently the idiomatic way to check if a string is non-empty in puppet 4 would be :
if $facts['subgroup'] =~ String[1] {
It does work in puppet4 but is not supported in language-puppet. Could language-puppet supports such idiosyncrasy or do you have a better idea ?
Cheers,