Update index.js

Fixed issue with individual checkboxes and radio buttons accepting any value to trigger as checked