Updated getEntityId

Added check for type === 'user' since people sometimes don't pluralize their collection names in requests. Also, the var 'type' could be confused with entity 'type' vs collection type.