properly check for identifiers, use autogenerated code for checks