`if (typeof(n) == 'number')` should be enough, isn't?