convert user::hostname to be a optional string