Probably better to raise an exception instead of returning `None`.  You should make a custom exception e.g. `IdNotFound` that inherits from `ValueError`.