Set hostname only if provided