[TypeCast] when allowing nullable parameter, return null
Merge pull request #290 from xuzhang/dev

[TypeCast] when allowing nullable parameter, return null