Check that we're using stack decoder before running stack decoder specific functions. Otherwise segfault may occur.