how about `if (!host || ...)` instead of an explicit comparison to `nullptr`