Added first line for checking the node for delete function