Explicitly check for None to accept 0 as a valid value.

Change-Id: I672c6b05ee6346251628d49998faf7bd87d203e7
Closes-Bug: 1369812
Merge "Explicitly check for None to accept 0 as a valid value."