Typecheck the #:guard clause of typed structs

Closes PR 14747