Adding validation check