String.toNumber() accept the same options of String.isNumeric()
The naive assertion functions didn't thow the required exceptions
String.toNumber() now returns null instead of NaN
Reset undefined to ensure that nobody modified it