Inlining WeakMap.delete's check for `has`.
Replaced the boolean cast in `has` with more explicit checks.