Added a new method.

I added a new method in which I tested the specification of Optional class.