Proper check for extension_id to avoid errors