This is wasting resources without need. It creates an Array and 7 Strings just for a comparison on every render.

This is better as a constant to match against and with the proper class objects:

    [NilClass, Fixnum, FalseClass TrueClass Array Hash].include?(obj.class)