maint: Deal with [].to_s problem in 1.9.2
[].to_s evaluates to "[]" in 1.9.2, unlike in previous Rubies where it
evaluates to "". This caused puppet resource to fail to strip some
empty values. This commit changes the way we check for empty values to
make it more ruby-version-agnostic.
Paired-with: Nick Lewis <nick@puppetlabs.com>