Throws exception instead of returning null

This is more consistent with how c# libraries usually operate