write_graphite: avoid printing out the NULL value in error messages