refactor Object::equals
make String::instanceof fast
make the method 'instanceof' fast
add tests for instanceof
fix a cpplint error