let a = 1
Number.isNaN(Number(a)) // false
a = 'a'
Number.isNaN(Number(a)) // true
country = Strana.object.create(name_s="Russia")
city = Gorod.objects.create(name_g="Moscow", id_strana=country)
SELECT DISTINCT "m"."id" FROM "main_table" AS "m"
LEFT JOIN "table_1" AS "t1" ON "t1"."main_table_id" = "m"."id"
LEFT JOIN "table_2" AS "t2" ON "t2"."table_1_id" = "t1"."id"
AND "t2"."nexessary_column" = 'you string to filter'