fix throwing undefined/null now makes tests fail, fixes #1395
Fix test
Merge branch 'dasilvacontin-fix/throwUndefined'

* dasilvacontin-fix/throwUndefined:
  Fix test
  fix throwing undefined/null now makes tests fail, fixes #1395