Fix Null pointer exception in SymbolStatementPatternFunction

This PR fix a bug that introduced by 1db2dcb824