changed all comparisons with None to the is|is not operator
a few fixes and changes