Added missing validation
Added missing validation and tests