Fix error in text formatter when note is nil