Changed 'not x is None' to 'x is not None' construct. Fixed some typos in the tutorials