jk, the previous version for checking valid identifiers was correct