fix #150, edge weight 0 turns false, now use /\d/.test() to check if it is a number first.