check result before calling toString
return code if no result
Merge pull request #7 from barisusakli/patch-3

check result before calling toString