added method to check if node is a leaf
added leaf() test