Add null check for config handler