Check to make sure result isset

Fixed #119