Simplify

if (typeof XXX == 'string') ->
if (XXX)