Updated class check for ActiveRecord::Base