fix bug when 'environment' is nil in hiera.yaml