Add more unit tests for Optional support