udebug: add inline helper function to test if a buffer is allocated