add more checks before adding address to footer

avoid empty lines and enable empty address in footer