Return undefined for depth if node has no parent