Simplify to check singleton class

refer: https://github.com/rubinius/rubinius/pull/2368\#discussion_r4459063