Throw exception if the entity handle is null in EntityBase.GetIEntity().