fixed error reporting from check methods about 'empty entity list' and 'no reference', and fixed all their test cases