throws an exception if a user tries to register a render or component that is null.