Added null check before adding node props.