Adjustment to variable check function