Add checking code to app_manager_get_app_id() API.