Fixed check isDatabase for Impala