Update collections.rb

`raw_collection.is_a?(String)` covers the same as `raw_collection.instance_of?(String) || raw_collection.instance_of?(ActiveSupport::SafeBuffer)`