fixed array out of bounds crash

It turns out that a subscript implementation (even after my previous fix) crashes if there are not results at all. This patch changes it to return nil.