Refactored the check if a node is blocked or closed