only encode address when not None