Only output namespace if it is not empty