catch invalid data in encoded functions over Nat8