admin - bug fix

The function didn't validate obj[index] exists before it checked a
nested value, which caused a JS error if obj[index] didn't exist.