fixed issue with collection type check