"if" statement causes error.

"if" statement causes error.

I keep getting an error from a simple "if" statement.
 
      noln = rawno.length();
 
... correctly returns the length of rawno.  But...
 
      if(noln != 10)
      {
      etc.
 
... gives an "Improper Statement" error for the "if" condition.
 
Huh?