Replaced references to type() function with is_string() for Puppet 3.7.x...

..., which now reserves the "type" keyword for future use.

https://docs.puppetlabs.com/puppet/3.7/reference/lang_reserved.html#reserved-words