Validation more elegant

Validation more elegant