Using optionals and iterables