Fixed usage of optional with structs and collections.