Fixed support for true, false and null values

There was an error in the word function where the error message would be thrown every time. I have now corrected this by using break statements to only throw an error if the word is undefined.

I have tested this in a Unity project which required parsing null and everything I have changed  on the project works.