You're right, this should be tested.
I guess it might freeze the odom (topic and TF), so everything that depends on it will get stuck. But I think that's what should happen, so we can distinguish this case from the robot not moving (zero encoder ticks).

I'll like to test this in simulation, but I think we don't have anything to simulate the NaN implemented. We could use the robot tough. Do you have any idea to try it in simulation?