Convert x.equal?(undefined) to undefined.equal?(x)

Follow a19d2b5 and cac8606