public static boolean isValidHeartbeatPeriod(final int period) {
        if (period >= 0x0000 && period < 0xFFFF)
            return true;
        throw new IllegalArgumentException("Period must be within the range of 0x0000 to 0xFFFF!");
    }
Validates heart beat period.

@param period Heartbeat publication period.
@return true if valid or false otherwise.
@throws IllegalArgumentException if the value does not range from 0 to 17.
mesh/src/main/java/no/nordicsemi/android/mesh/utils/Heartbeat.java