Ensure type safety of the collection