add _check_node_string and _check_graph functions
Fixed failing tests