Added hasErrors method.