Adding null check to config