sub empty_to_undef { return defined($_[0]) && !length($_[0]) ? undef : $_[0]; }