verify ListNode null or not before use ListNode.next, keep away from null pointer exception