Fix check for SQLite connection