Only override write command ReadPreference to Primary if connected to a replica set.