Fix setting defaults for 0

The check for the presence of a default was incorrect, causing values of
0 to be interpretted as no default and setting it to an empty string.
This patch corrects the logic that checks for a default.

Change-Id: I6f720346cbd7645ccbbbad96ddc24bc2757e3805