Added callback check on Pool.prototype.query error response

Addendum to previous commit to check if callback is a function when we receive an error from getConnection()