Prevent missing hostname or domain from causing error