Remove useless test, and keep 'classForObject()' efficient.