add null support to dotti factory