We should be using "if value is not None" to better check
for the condition where the value is 0 and 0 is not in the
valid range.
Co-Authored-By: Longjie_Cao <grasson1101@aliyun.com>
Closes-Bug: #1416212
Change-Id: Ie5c81f1916e301619955364b040bdc7a9275e29c