(PUP-1547) Undefined method for nil:NilClass when no providers found

When a puppet type has a list property and no providers are found for that type,
provider is nil and causes an "Undefined method 'property' for nil:NilClass" error.
ie. Undefined method 'groups' for nil:NilClass for the user type

Check if provider is nil before trying to access the property
Merge pull request #2311 from carlossg/PUP-1547

(PUP-1547) Undefined method 'groups' for nil:NilClass when no providers found