Surround the getString("name") with a try catch statement and in the catch assign null to the array element.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.