Check for NaN. (Fixes suddenly disappearing robots.)