converting typeOf call to typeof