Implemented isValid()