Use is_a instead of relying on toString.