getElementClass returns the type inside a collection right? If we consider Optional as a container, then we would return Foo.