This may or may not be needed? It'll eventually fail with a `KeyError` down the line if this check weren't there. I think if anything, it'd allow a better error message to the user.