lw_server_client_next: check for NULL return value from list_elem_next