Simplify type checking.
Add RegExp support.
Detect DOM atoms and throw an error.