class Validator {

  public static void checkNullOrNotEmpty(@Nullable String value, String propertyName) {
    if (value == null) {
      // pass
      return;
    }
    Preconditions.checkArgument(
        !value.trim().isEmpty(), "Property '" + propertyName + "' cannot be an empty string");
  }

}