fix validation for nullable