check ip validity, clear store