added isRegExp predicate