Fixed PHP notice when checking user entity which is missing type property.