The `NoneType` object is not available from the `types` module in python 3. This is a workaronud to deal with that.