Optimize check if length is a number for _.each