re checking parameter values, you could write an ASSERT() function, but this would likely slow things down.
e.g.
set a named value called ASSERT_ON to TRUE (or FALSE)
Define ASSERT as LAMBDA(condition, message, IF(ASSERT_ON, IF(NOT(condition), message, ""), ""))
Then you could use it like this:
LAMBDA( p1, p2,
assert_txt, ASSERT(ISNUMBER(p1), "P1 must be a number") & ASSERT(p2<>"", "P2 must not be blank"),
IF(assert_txt="",
LET(
...
),
assert_txt)
it's a bit messy but you can turn the error checking on and off with the ASSERT_ON value
I'd also suggest that giving your parameters a suitable name would help e.g. instead of p1, p2 above use input_number, non_blank_text to give a substantial clue to what is expected...