account for model.is_a?(ActiveModel::Errors) case in debugging output