def METHOD_NAME(self, other):
    typ = Type(self)
    if typ != Type(other):
        return False
    if typ == 'Undefined' or typ == 'Null':
        return True
    if typ == 'Boolean' or typ == 'String' or typ == 'Number':
        return self == other
    else:  # object
        return self is other  # Id compare.