nodeca/js-yaml — pull request #155 by paolochiodi (2014-12-18 17:31:47+00:00)
Title: error parsing named null

I have this sample:
```js
require('js-yaml').load('---\ntest: !!null \ntest2: some text'); // notice the space between null and \n
```
Throws `TypeError: Cannot read property 'length' of null` (attached full stack)

While this
```js
require('js-yaml').load('---\ntest: !!null null\ntest2: some text');
```
and this
```js
require('js-yaml').load('---\n- ntest: !!null \n- test2: some text');
```
work properly.

I've seen that adding
```js
if (data === null) {
return true;
}
```
here https://github.com/nodeca/js-yaml/blob/master/lib/js-yaml/type/null.js#L6 solves the problem, but I'm unsure this is the correct way to tackle the problem.

If you could point me to the right direct I'd be happy to provide a pull request.

Attached: Full stackstrace
```
TypeError: Cannot read property 'length' of null
at Type.resolveYamlNull [as resolve] (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/type/null.js:6:17)
at composeNode (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/loader.js:1377:17)
at readBlockMapping (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/loader.js:1037:11)
at composeNode (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/loader.js:1317:12)
at readDocument (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/loader.js:1478:3)
at loadDocuments (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/loader.js:1530:5)
at load (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/loader.js:1547:19)
at Object.safeLoad (/Users/paolochiodi/test/node_modules/js-yaml/lib/js-yaml/loader.js:1565:10)
at repl:1:4
at REPLServer.self.eval (repl.js:110:21)
```