Replace by conditions

ImmagihhneHi everybody, Is it possible to replace empty values (instead with null values) with their ID number (they are walls).
Thanks