Remove unnecessary check for non-null in PubSubProvider

addExtension() does that already.