Many improvements for the handling of null values