Added validation to the setters