properly handle null values in csv export

fixes #204