Maybe I'm missing something, If the value == None, we don't want to check it in the subsequent getattr call, right? I suspect you meant to put "continue" instead of "pass" here