O is an object, not an ordinary object, so you cannot access O.[[Extensible]] directly.
If O.[[Extensible]] is false, throw a TypeError exception.
What should it behave for the exotic objects? Calling O.IsExtensible() might trigger user code (in a Proxy).