Missing object reference in write example

This patch fixes write to CSV example - it was calling writeValueAsString without passing in object to be written.