Implement function for kx.iterator now uses the type() function to ensure cross-browser compatibility
Also fixed 1 jshint error