correctly throw when finding invalid data