Registry: Remove redundant type validation logic in #register

* Remove second 'typeof', string has already been asserted on top.
* Remove second 'throw' in else case, no other other types can
  get here.

Change-Id: I141977beb93f68a73522703a3db0ab2b5476c212
Merge "Registry: Remove redundant type validation logic in #register"