fixed validation of null values