Update puppet.rb

Explicit non-nil checks are usually redundant.