fixed crash when validating nil values