prevent error on missing record id