check whether entity is null