Throw exception on invalid special characters on string definition.