Thanks Glaring. Sorry for the later reply.
I want to handle this kind of case:
void generic_wrapper_fallback(const c10::OperatorHandle& op, torch::jit::Stack* stack) {
  ...
}

One of input argument inside in jit::stack could be the type of c10::optional.
How can I pick the argument with this type out?