Added validation to nodes