Changed == to isEqual in all places applicable.