Minor change on validation line
isValid function is created