private String parseOption(Map<Option, Object> result, Option option, String arg) {

		// Fail if the option requires an argument.
		if (option.hasArgument() && !arg.contains("="))
			return "The option --" + option.getLongName() + " has an argument.";

		if (option.hasArgument()) {

			// Split the argument
			String value = arg.substring(2).split("=", 2)[1];

			// Cache the result value.
			Object resultValue = null;

			// Just set the result value to the raw string.
			if (option.getType() == null) {
				resultValue = value;

			// Convert the value.
			} else {
				try {
					resultValue = option.getType().parseValue(value);
				} catch (IllegalArgumentException e) {
					return e.getLocalizedMessage();
				}
			}

			// Create an array if an option can occur multiple times.
			if (option.isMulti()) {

				// Add a value to the array if the option was already added.
				if (result.containsKey(option))
					result.put(option, ArrayUtils.add((Object[]) result.get(option), resultValue));

				// Create a new array if this is the first occurence.
				else
					result.put(option, new Object[] {resultValue});
			} else {

				// Fail if this option is already used.
				if (result.containsKey(option))
					return "Option --" + option.getLongName() + " is already given.";

				// Add the value.
				result.put(option, resultValue);
			}

		} else {
			result.put(option, true);
		}

		return null;
	}