Fix none comparisons

Goes further than 1a68f107 (which was displaying a warning, if PythonSource was outputting a numpy array) and replace these unsafe constructs, `!= None` and `== None`, everywhere.