check whether defined ActiveRecord