Errors if the department is not valid.