extend rais only if defined