Added some validation to EntityRegistry (type and required)