Fixing check for empty hostname to cover case where task is created without a host. Host would error upon editing before this fix