reverted === null checks to == … too many issues came up and they'll have to be modified by hand.