Don't add entities with whitespace-only names.
Add unique index to entity attributes to avoid ruby-level race conditions.