Fix -z check for variable

Change-Id: I7e7eebf81f6822c7e7df5d0c28b2e597fe0fadca