Better handling of nil parameter values.

This implementation may run into problems if somebody is explicitly expecting
NSNull - but this should be rare.