There is nothing to rewrite as “nan” is not a sentence or phrase.