Check if ActiveRecord is defined