Check if data is available before flushing input when checking Nanode time.
This should eliminate the possibility of destroying valid data.