public static boolean isValidOpcode(final int opCode) throws IllegalArgumentException {
        if (opCode != (opCode & 0xFFFFFF))
            throw new IllegalArgumentException("Invalid opcode, opcode must be 1-3 octets");

        return true;
    }
Checks if the opcode is valid

@param opCode opCode of mesh message
@return if the opcode is valid
mesh/src/main/java/no/nordicsemi/android/mesh/utils/MeshParserUtils.java