public static void checkEquals(
      @Nullable String value, String propertyName, String expectedValue) {
    Preconditions.checkNotNull(value, "Property '" + propertyName + "' cannot be null");
    Preconditions.checkArgument(
        value.equals(expectedValue),
        "Property '" + propertyName + "' must be '" + expectedValue + "' but is '" + value + "'");
  }
Checks if string is equal to the expected string.

@param value the string in question
@param propertyName the equivalent 'yaml' property name
@param expectedValue the value we expect {@code value} to be
@throws NullPointerException if {@code value} is null
@throws IllegalArgumentException if {@code value} is not equal to {@code expectedValue}
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/buildfile/Validator.java