Added logic for polymorphic comment model