This can use pointer quality instead of a class check.