this might mask other errors. could you just change the initial conditional to just check for truthiness (removing ` is not None`) instead?