consolidated variable map nil / empty validation guard