Fix range validation with empty value