Changed some comparisons to None to address numpy's FutureWarning.

This would have eventually broken the code if unaddressed.