The not nil check here seems redundant.