Fix when db is not provided, like on sentinels

I got an error when connecting to sentinels. Redic called anyway the "SELECT" command which Redis Sentinels don't understand. I added another check before calling it.