private function _is_result($value) { // check whether a value is a valid result set obtained from a query against the database return $value instanceof mysqli_result; }