I know that parsing sucks, but would it not make more sense to use

mount | cut -d " " -f 3 | grep -q "^/sys/kernel/debug$"

to have it easily usable on non Linux systems? mountpoint is not posix and looks very linux only'ish