Add error detection and toString for List