handle null parentId for readChild