Make sure node type is not undefined