Fixed validate entity check