resolves #1395: fix throw undefined/null

Issue #1395.

I'm not if you agree on making a test fail when ```null``` is thrown. I've added some info in the issue so that we can discuss it there, and then make changes here, if necessary.

Note that  I've marked a test case from ```Runnable``` as pending.