Properly handle optional arguments in Type code. Fixes #3.