Determine if we have a valid classname for the target token.

@since 0.11.0 This logic was originally contained in the `process()` method.

@param int $stackPtr The position of the current token in the stack.

@return bool