Creating an empty ListNode seems to default to [0] which breaks one of the test cases in javascript.
new ListNode(null) === [0]
test case requires the answer to be []