Sometimes the line can be null when rendering output. A good example is when executing a merge statement and outputting a line at the end of the merge statement like "OUTPUT $action, inserted.*, deleted.*;"