Functions to check database type