isNaN dosn't work

i need to check if it is a number but the isNaN dost work i get this error

 Error: Method not found: 'isNaN'.
          rh = (!isNaN(rh[0])) ? rh.substring(1) : rh;

Implementation of isNaN

bool get isNaN;

on int and double class.

 call method isNaN on variable of int or double  instead of passing value to isNaN
 rh = (!(rh[0]).isNaN) ? rh.substring(1) : rh;

Hello thanks a lot men it works.