public static boolean validateIvIndexInput(final Context context, final Integer ivIndex) throws IllegalArgumentException {
        if (ivIndex == null) {
            throw new IllegalArgumentException(context.getString(R.string.error_empty_iv_index));
        }

        if (!isValidIvIndex(ivIndex)) {
            throw new IllegalArgumentException(context.getString(R.string.error_invalid_iv_index));
        }

        return true;
    }
Validates the IV Index input

@param context context
@param ivIndex IV Index input
@return true if the the value is valid
@throws IllegalArgumentException in case of an invalid was entered as an input and the message containing the error
mesh/src/main/java/no/nordicsemi/android/mesh/utils/MeshParserUtils.java