$::operatingsystem returns an empty string when registry::value is used in rspec. Added a check to the fail condition so empty strings are allowed, allowing rspec to test against registry::value