Improve OM2 writer, especially for time and empty values