If not null or equal to the given string, return the string with the given mapping lambda applied, otherwise null.