Is this kind of problem could be solved with union type ?
abstract fun or(other: Optional<U>): Optional<T|U>