Remove redundant LENGTH calls in NSUBSTITUTE[-IF[-NOT]]