Added variable check