properly write NULL values in postgres provider

If you have an integer field, toString will return 0 hence having a '0' in the INSERT.