This fix should work with both puppet 2.7 which will return undefined and puppet 3.x which will return 'nil' that evaluates to a boolean false and then return the "undefined" string.