Removed -z tests

replaced “! -z” tests with “!=“