Update index.js

Fixed boolean issue when false.
Update index.js

Modified to handle booleans spefically.
Merge pull request #3 from dorlandode/master

Fix to handle booleans