On the Distortion of the NiO6 Octahedron in BaNiGd2O5