title: Don't do unnecessary list type casting to avoid replacing None values by empty lists
comments: _The documentation is not available anymore as the PR was closed or merged._ Quick question about the message in the warning. You say "will be fixed in a future major version" but don't you mean "will raise an error in a future major version"? Right ! Good catch, thanks, I updated the message to say "will raise an error in a future major version"
body: In certain cases, `None` values are replaced by empty lists when casting feature types.
  
  It happens every time you cast an array of nested lists like [None, [0, 1, 2, 3]] to a different type (to change the integer precision for example). In this case you'd get [[], [0, 1, 2, 3]] for example. This issue comes from PyArrow, see the discussion in https://github.com/huggingface/datasets/issues/3676
  
  This issue also happens when no type casting is needed, because casting is supposed to be a no-op in this case. But as https://github.com/huggingface/datasets/issues/3676 shown, it's not the case and `None` are replaced by empty lists even if we cast to the exact same type.
  
  In this PR I just workaround this bug in the case where no type casting is needed. In particular, I only call `pa.ListArray.from_arrays` only when necessary.
  
  I also added a warning when some `None` are effectively replaced by empty lists. I wanted to raise an error in this case, but maybe we should wait a major update to do so
  
  This PR fixes this particular case, that is occurring in `run_qa.py` in `transformers`:
  ```python
  from datasets import Dataset
  
  ds = Dataset.from_dict({"a": range(4)})
  ds = ds.map(lambda x: {"b": [[None, [0]]]}, batched=True, batch_size=1, remove_columns=["a"])
  print(ds.to_pandas())
  # before:
  #              b
  # 0  [None, [0]]
  # 1    [[], [0]]
  # 2    [[], [0]]
  # 3    [[], [0]]
  #
  # now:
  #              b
  # 0  [None, [0]]
  # 1  [None, [0]]
  # 2  [None, [0]]
  # 3  [None, [0]]
  ```
  
  cc @sgugger 