Strict check so empty strings and strings with just 0 get handled correctly

Change-Id: If196eb3cd7f347a032cb15791f7fad509b32766e
Merge "Strict check so empty strings and strings with just 0 get handled correctly"