skip transformations on nil values

This fixes an edge case that I recently uncovered while upgrading to the latest version of the gem. Prior to this change, transformations were being attempted against null values and resulting in exceptions like:

    NoMethodError:
       undefined method `upcase' for nil:NilClass

I believe the test covers the only scenario under which this would occur.