Add one if statement to tell your parent node is null