Nit: I would make the precedence of this statement more explicit by parenthesizing between typeof and 'string'.