That looks like my old (pre-recent-MetronomeMark improvements)
function/macro for making tempo indications...
And the error makes it look like it might be a bug in lily anyway,
but I
don't want to say that because I've been wrong too often - is the code
looking for something called "type-check" that should be there and
isn't?
No... it's just indicating that this old code needs updating.
Actually, it should be replaced entirely by a MetronomeMark-based
function -- I've got a couple that I will be submitting to LSR soon.