using optionals and streams in method objects