# Incidence rate ratio after negative binomial results in R

I am trying to calculate the incidence rate ratio of my negative binomial model. After running my negative binomial regression model, I use exp(Mymodel) in order to get the incidence rate ratio but R gives me this message: non-numeric argument to mathematical function.

Is the code wrong?

exp(coef(Mymodel))

Mymodel is a model object containing much more than the fitted coefficients, and some of this components are not numerical, causing the error message. The coef method just extracts the coefficients.