public static void checkNotNullAndNotEmpty(@Nullable String value, String propertyName) {
    Preconditions.checkNotNull(value, "Property '" + propertyName + "' cannot be null");
    Preconditions.checkArgument(
        !value.trim().isEmpty(), "Property '" + propertyName + "' cannot be an empty string");
  }
Checks if string is non null and non empty.

@param value the string in question
@param propertyName the equivalent 'yaml' property name
@throws NullPointerException if {@code value} is null
@throws IllegalArgumentException if {@code value} is empty or only whitespace
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/buildfile/Validator.java