change collections.rb

`raw_collection.is_a?(String)` covers the same as `raw_collection.instance_of?(String) || raw_collection.instance_of?(ActiveSupport::SafeBuffer)`
Merge pull request #1081 from timoschilling/patch-1

Update collections.rb