The SQL has
SELECT osm_id, way, name, (hstore_to_json(names))::text name_, rank::text AS class, -- TODO: use a case statement to do this properly NULL::bool AS capital, NULL::int AS rank
It is part of a UNION ALL, but the other part also has NULLs.
I'm not sure what was originally intended for those two columns, but they're obviously not used as-is. They should either be fixed and used, or removed.