Ensures that we can parse Ruby files that has no body.

When parsing a ruby file it's possible to get a RootNode that
has no body. This commit ensures that we check for this condition
and return an empty list of Nodes when searching for NodeTypes instead
of failing on an NPE.

Closes #491