Change undef to only check vars