Add checks for missing variables.