fix check for ActiveRocord model