How can I check a variable with an If statement?

The title says it all. How can I check a variable with an If statement?

Assuming that the variable name is xVar.

if(xVar == “abcde”){
trace(“Stop Typing ABCDE!”);
}

Clearly this is wrong. Does anyone know the right way to do this??