make sure a last child exists before determining its nature