coalesce NSNull -> nil

In general, the API omits any "falsy" value (which means this
would return nil), but in certain cases we do include an
explicit null, which can break things.