check for valid