I'll optimize this in another pass tonight (see `isRegExp`)