fixed nullpointer in TableQuery.getRowCount()