Allow the use of buffers and None in to_hdf and read_hdf.

If `None` is passed `to_hdf` will return the data.