Added validation checks