check if a variable is in a register already