added check for singular 'user' in getEntityId