checking for valid id