processIdentifier function

Handle an identifier that may be illegal (e.g. containing spaces).