Added check of registering type