Add test cases for optional of list (#19592)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19592
This is already supported but wasn't tested yet
Reviewed By: ezyang
Differential Revision: D15039888
fbshipit-source-id: dc8ea724c76dd1719b1d4810a20c8f958e5beecc