Implement a hasErrors() method