fixed now can save null values; added tri-state checkbox