Added the ability to determine the type of node