Added type checking, completed DwApiBase tests.