Throw exceptions only when datasource has wrong package, not check for instance of Datasource