Actually, in this case we're already doing a try/except just below which will catch the getattr, so there's no point in doing it again - we can remove this if.