added valid entity checking to world