Fix NPE problem in AbstractDataSource