function to check pointers on nodes