Update index.js

throw an Error when x,y is not look like a Number.
Merge pull request #5 from heroboy/patch-1

Update index.js