sure, but then the later parentIds == nil check needs to change to a len() == 0 check.