Electronic and optical properties of NbO2