Made the validation more concise