Editor script executing before variable updated

I have a customized inspector window via an editor script. I have a little [ + ] and [ - ] button to add items to a List. The problem is when I press the [ + ] button to add a new item to the list, it throws a few NullReferenceException’s at me in the error log before showing the new list item in the inspector. I think what’s happening is when I add a new item to the List, it hasn’t quite initialized by the time the Editor Script is trying to run through itself again, so it logs an error once or twice before it’s able to display the new item.

But how can I prevent the errors? I can’t say… if ( listArray[num].item != null ) because then it just throws a NullReferenceException as the item doesn’t exist yet! However the listArray.Count is updating early so my code still believes there is an item there when there isn’t yet…

My only explanation is that I’m correct in my assumption that the List hasn’t been created by the time the editor is trying to access it the first couple of times, so I just suppressed the error message with a try catch block with a custom error message that’s empty.

try
{
    // line of code
}
catch (err) {}