instanceof check before blindly casting to JDBCDataStore