use err param of callback if null result is returned from api for datasciencetoolkit