Add type check to AttachedCollection
Remove OfType<T> enumeration casts