Functions for robust variable handling
