[HUDI-4122] Fix NPE caused by adding kafka nodes (#5632)