Restrict types for stubs in itertools

Can use Union type to model Maybes and Products.