Maybe raise an exception instead of returning `None` here? Saves us checking return values everywhere like we're in C.