fixed the pair? and list? predicates, added a unit test method for the error function