check if address is valid