Moved the definition of prefix

So type function can be used in conditional