node_type check was missing