Correct testdata writer to work with `nil`