make match safe

`String.prototype.match` returns `null` if there is no match. For example:

```javascript
> 'abc'.match(/x/)
null
```

This change is largely copied from #13.

This type seems incorrect. Something like 

```
forall r. Fn4 Regex String ([String] -> r) r r
```

makes more sense to me.