[TypeCast] when allowing nullable parameter, return null

For TDIS-6431