Added a exists() method which returns boolean whether the result for query exists

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