taskfactory return null if type not registered