do_othername: check for NULL after allocating objtmp