Check entity class before initializing