Improve error checking in slycat.hdf5.store_array_attribute.