handle null hosts