reuse available collection? check instead of macro

Reflection has an available method that is used to check if the
reflection is a collection. Any :has_many macro is considered a
collection and `collection?` should be used instead of
`macro == :has_many`.
Merge pull request #15597 from eileencodes/reuse-available-collection-methods

reuse available collection? check instead of macro