Added move semantics for optional