Comparing negative binomial model to the null model with offsets

#1
Hi there,

I have a negative binomial model of count data with an offset (total counting effort) in R:

L1<-glm.nb(counts~offset(log(total.counts))+temperature, link='log', data=dat)

and I want to compare it to the null model. Am I right in thinking I can just do:

L2<-glm.nb(counts~offset(log(total.counts))+1, link='log', data=dat)

anova(L1,L2)

to show whether temperature has a statistically significant effect on counts?