verify if registration is sent before try to access agentData in Theme.php
fix MagicGetter: verify if method usesMetadata exists before call it
verify if user can view the entity int API (ref: #540)