That's correct. I used Optional because it's included in Java and it's simpler. With Optional I could explain handling the presence of errors, but not the inspection of errors.
A full replacement is the Result type (a specialized 'Either'): https://doc.rust-lang.org/std/result/