added a check for null / "" todoItems.