if Node.Parent = nil then
  ShowMessage('this node doesn't have parentnode')
else
beginend;