Fixed "use of undeclared identifier 'typeof'" bug

Fixed "use of undeclared identifier 'typeof'" bug