added exists() method

This method will return a boolean value, whether the result for the query exists or not.