Allow encode null value.

When trying update existing value to null value exception occurs. I added IF case to handle this.
Is it OK?