Update sql_writer.py

check value...