Update blink1.js

Improve existing typechecking, add additional typechecking