Object.is-like function