[1.7.x] Fixed #23761 -- Fixed crash with MySQL validator and db_type is None.

The issue was fixed on master in e9103402c0fa873aea58a6a11dba510cd308cb84.