documenting isRegExp
(cherry picked from commit 53122d08bd7ed9f98ac42c5eda4e3093a6e46770)