more robust checking of invalid types
add tests for event trigger
tests for events and invalid types
Merge branch 'master' of https://github.com/petkaantonov/FieldstateJS