app_stack: protect against missing parameters to STACK_PEEK and LOCAL_PEEK