None is a singleton, so using 'is not None' should be slightly more efficient.