add null checking to catch root vertex problems