Adding validation checks