Handle undef when converting to string.