Fix #540 - Add check to make datareader is of currect type