ensure type in nodes