fixed araqne/issue#14. fixed NPE caused by null result set